/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`.
Request body
- numberIdstringRequired
- Zaiped id (whatsappConnections)
- tostringRequired
- messageobjectRequired
- contextWamidstring
One of the following shapes, chosen by message.type:
message.type = "text"
- textstringRequired
- previewUrlboolean
message.type = "image" | "video" | "audio" | "document" | "sticker"
- mediaobjectRequired
- captionstring
- fileNamestring
message.type = "location"
- latitudenumberRequired
- longitudenumberRequired
- namestring
- addressstring
message.type = "contacts"
- contactsobject[]Required
message.type = "reaction"
- wamidstringRequired
- emojistringRequired
message.type = "buttons"
- headerobject
- bodystringRequired
- footerstring
- buttonsobject[]Required
message.type = "list"
- headerstring
- bodystringRequired
- footerstring
- buttonstringRequired
- sectionsobject[]Required
message.type = "cta_url"
- headerobject
- bodystringRequired
- footerstring
- buttonTextstringRequired
- urlstringRequired
message.type = "carousel"
- bodystringRequired
- mediaKind"image" | "video"Required
- cardButton"url" | "reply"Required
- cardsobject[]Required
message.type = "location_request"
- bodystringRequired
message.type = "flow"
- flowIdstringRequired
- Zaiped id (flows)
- headerobject
- bodystringRequired
- footerstring
- ctastringRequired
message.type = "product"
- bodystring
- footerstring
- retailerIdstringRequired
message.type = "product_list"
- headerstringRequired
- bodystringRequired
- footerstring
- sectionsobject[]Required
message.type = "catalog_message"
- bodystringRequired
- footerstring
- thumbnailRetailerIdstring
message.type = "call_permission"
- bodystringRequired
message.type = "template"
- templateIdstringRequired
- Zaiped id (templates)
- valuesobjectRequired
Response (object)
- wamidstringRequired
- tostringRequired
- status"accepted" | "held_for_quality_assessment"Required
curl -X POST "https://zaiped.com/v1/messages" \
-H "Authorization: Bearer zp_..." \
-H "Content-Type: application/json" \
-d '{
"numberId": "…",
"to": "…",
"message": {
"type": "text",
"text": "…"
}
}'