Skip to main content
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": "boas_vindas_v2",
          "language": {
            "policy": "deterministic",
            "code": "pt_BR"
          },
          "components": [
            {
              "type": "body",
              "parameters": []
            }
          ]
        }
      }
    ]
  }
}
'
{
  "messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}

Overview

Sends a Meta-approved message template to a contact. This is the only way to send messages outside the conversation window (24 hours). The content.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

Authorization
string
header
required

Secret Key gerada no painel de Segurança do Hub Message

Path Parameters

channelId
string
required

ID do canal

Example:

"SEU_CHANNEL_ID"

Body

application/json
recipient
object
required
content
object
required

Response

Mensagem enviada com sucesso

messageId
string

ID da mensagem enviada