curl --request POST \
--url https://api.hubmessage.io/v1/channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"identifier": "5511999999999"
},
"content": {
"type": "TEMPLATE",
"attachments": [
{
"template": {
"name": "welcome_v2",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": []
}
]
}
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Templates
Send template
Send Meta-approved templates
POST
/
v1
/
channels
/
{channelId}
/
messages
curl --request POST \
--url https://api.hubmessage.io/v1/channels/{channelId}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recipient": {
"identifier": "5511999999999"
},
"content": {
"type": "TEMPLATE",
"attachments": [
{
"template": {
"name": "welcome_v2",
"language": {
"policy": "deterministic",
"code": "en_US"
},
"components": [
{
"type": "body",
"parameters": []
}
]
}
}
]
}
}
'{
"messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}{
"error": 401,
"message": "Unauthorized"
}Overview
Sends a Meta-approved message template to a contact. This is the only way to send messages outside the conversation window (24 hours). Thecontent.type field must be TEMPLATE and the template is sent within attachments.
The template must have
APPROVED status to work. Use the Templates endpoints to create and manage your templates.Authorizations
Body
application/json