Skip to main content

Tipos de mensagem

{
  "messaging_product": "whatsapp",
  "to": "5511999999999",
  "type": "text",
  "text": {
    "preview_url": false,
    "body": "Olá! Como posso ajudar?"
  }
}

Parâmetros

messaging_product
string
default:"whatsapp"
required
Sempre "whatsapp".
to
string
required
Número do destinatário no formato E.164 sem o +.
type
string
default:"text"
required
Tipo da mensagem: text, image, document, audio, video, sticker, location, contacts, template, interactive, reaction.
text
object
Obrigatório quando type é text.
image
object
Obrigatório quando type é image. Use link (URL pública) ou id (media_id do upload).
document
object
Obrigatório quando type é document. Use link ou id + filename.
audio
object
Obrigatório quando type é audio. Use link ou id.
video
object
Obrigatório quando type é video. Use link ou id.
template
object
Obrigatório quando type é template. Veja exemplos nas abas acima.
interactive
object
Obrigatório quando type é interactive. Suporta button, list, cta_url, flow, product, product_list.
reaction
object
Obrigatório quando type é reaction. Campos: message_id, emoji.
phone_number_id
string
Obrigatório apenas com token de organização. Com token de instância é resolvido automaticamente.

Resposta

{
  "messaging_product": "whatsapp",
  "contacts": [
    { "input": "5511999999999", "wa_id": "5511999999999" }
  ],
  "messages": [
    { "id": "wamid.HBgLNTUxMTk5OTk5OTk5..." }
  ]
}