REST reference

Messages

The Messages routes. Every body is JSON, and an error always comes back as an object with a code and a message.

POST

/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": "…"
  }
}'
POST

/v1/messages/{wamid}/read

Mark a received message as read

Optionally shows the typing indicator for up to 25 seconds.

Path parameters

wamidstringRequired
The WhatsApp message id (`wamid`) of the received message.

Request body

numberIdstringRequired
Zaiped id (whatsappConnections)
typingboolean

Response (object)

oktrueRequired
curl -X POST "https://zaiped.com/v1/messages/YOUR_WAMID/read" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "numberId": "…"
}'
POST

/v1/blocked

Block a phone number

Meta only allows blocking users who messaged the number in the last 24 hours.

Request body

numberIdstringRequired
Zaiped id (whatsappConnections)
phonestringRequired

Response (object)

oktrueRequired
curl -X POST "https://zaiped.com/v1/blocked" \
  -H "Authorization: Bearer zp_..." \
  -H "Content-Type: application/json" \
  -d '{
  "numberId": "…",
  "phone": "…"
}'
DELETE

/v1/blocked/{numberId}/{phone}

Unblock a phone number

Path parameters

numberIdstringRequired
The number id, as returned by list_numbers.
phonestringRequired
The phone in E.164 (`5511999999999`).

Response (object)

oktrueRequired
curl -X DELETE "https://zaiped.com/v1/blocked/YOUR_NUMBER_ID/YOUR_PHONE" \
  -H "Authorization: Bearer zp_..."
REST reference