Pular para o conteúdo principal
POST
/
v1
/
channels
/
{channelId}
/
messages
Enviar contato
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": "CONTACT",
    "attachments": [
      {
        "name": "Gutemberg Fernandes",
        "phones": [
          "5511888888888"
        ]
      }
    ]
  }
}
'
{
  "messageId": "wamid.HBgNNTU0NDk3MDUwNzg1FQIAERgSM0"
}

Conceituação

Envia um contato para um destinatário. O campo content.type deve ser CONTACT. Você pode enviar múltiplos telefones no array phones.
Este endpoint só funciona quando a janela de conversa de 24 horas estiver aberta.

Autorizações

Authorization
string
header
obrigatório

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

Parâmetros de caminho

channelId
string
obrigatório

ID do canal

Exemplo:

"SEU_CHANNEL_ID"

Corpo

application/json
recipient
object
obrigatório
content
object
obrigatório

Resposta

Mensagem enviada com sucesso

messageId
string

ID da mensagem enviada