/v1/messages
Send a message
Sends any message type the Cloud API supports (text, media, location, contacts, reaction, interactive buttons and lists, CTA URL, carousel, flow, product, template). Free-form messages need an open 24-hour window with the recipient; templates do not. Media is referenced by the `mediaId` returned by upload_media (`media: { path }`) or by a public `link`.
Corpo da requisição
- numberIdstringObrigatório
- Zaiped id (whatsappConnections)
- tostringObrigatório
- messageobjectObrigatório
- contextWamidstring
Uma das formas abaixo, escolhida por message.type:
message.type = "text"
- textstringObrigatório
- previewUrlboolean
message.type = "image" | "video" | "audio" | "document" | "sticker"
- mediaobjectObrigatório
- captionstring
- fileNamestring
message.type = "location"
- latitudenumberObrigatório
- longitudenumberObrigatório
- namestring
- addressstring
message.type = "contacts"
- contactsobject[]Obrigatório
message.type = "reaction"
- wamidstringObrigatório
- emojistringObrigatório
message.type = "buttons"
- headerobject
- bodystringObrigatório
- footerstring
- buttonsobject[]Obrigatório
message.type = "list"
- headerstring
- bodystringObrigatório
- footerstring
- buttonstringObrigatório
- sectionsobject[]Obrigatório
message.type = "cta_url"
- headerobject
- bodystringObrigatório
- footerstring
- buttonTextstringObrigatório
- urlstringObrigatório
message.type = "carousel"
- bodystringObrigatório
- mediaKind"image" | "video"Obrigatório
- cardButton"url" | "reply"Obrigatório
- cardsobject[]Obrigatório
message.type = "location_request"
- bodystringObrigatório
message.type = "flow"
- flowIdstringObrigatório
- Zaiped id (flows)
- headerobject
- bodystringObrigatório
- footerstring
- ctastringObrigatório
message.type = "product"
- bodystring
- footerstring
- retailerIdstringObrigatório
message.type = "product_list"
- headerstringObrigatório
- bodystringObrigatório
- footerstring
- sectionsobject[]Obrigatório
message.type = "catalog_message"
- bodystringObrigatório
- footerstring
- thumbnailRetailerIdstring
message.type = "call_permission"
- bodystringObrigatório
message.type = "template"
- templateIdstringObrigatório
- Zaiped id (templates)
- valuesobjectObrigatório
Resposta (object)
- wamidstringObrigatório
- tostringObrigatório
- status"accepted" | "held_for_quality_assessment"Obrigatório
curl -X POST "https://zaiped.com/v1/messages" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"numberId": "…",
"to": "…",
"message": {
"type": "text",
"text": "…"
}
}'