Getting started

Module

Messaging

Unified WhatsApp API: send, track, mark as read and query text, templates, media, location, contacts, interactive messages and reactions.

POST/messagesScope: writeOfficial + Basic

Send a typed WhatsApp message.

Use conversation_id to reply or connection_id plus recipient to start. Recipient accepts phone, contact, BSUID, parent BSUID or username and is never inferred. type defaults to text — the only type the Basic plan connection accepts; every other type requires an Official connection and the Official/Agency plan. Authorization with the API key is the only required credential. Idempotency-Key is optional and recommended for retries.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
Idempotency-KeyoptionalheaderOptional and recommended for idempotent retries (8–128 characters).
textoptionalstringMessage text; required when type=text.
typeoptionaltext | template | image | video | audio | document | sticker | location | contacts | interactive | reactionMessage type. Defaults to text.
templateoptionalobjectFor template: name, language and optional components.
mediaoptionalobjectFor media: link or id; caption and filename are optional.
interactiveoptionalobjectNative Meta interactive object (button, list or flow).
reply_to_message_idoptionalstringWAMID of the message being replied to.
biz_opaque_callback_dataoptionalstringCorrelation returned by Meta in status events (max 512).
conversation_idoptionaluuidUse to reply to an existing conversation.
connection_idoptionaluuidConnection used to start a new conversation.
recipientoptionalobjectTo start: phone, contact_id, business_scoped_user_id, parent_business_scoped_user_id or username.
tooptionalstringLegacy: equivalent to recipient.phone.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "content-type: application/json" \
  -d '{
  "conversation_id": "<CONVERSATION_ID>",
  "type": "text",
  "text": "Ola, Maria. Posso te ajudar?"
}'

Responses

202Meta accepted the send; track delivery through history or webhook.
404Conversation or connection not found.
422Missing text or incomplete target.

Response example

{
  "data": {
    "conversation_id": "<CONVERSATION_ID>",
    "provider_message_id": "wamid.HBgM...",
    "type": "text",
    "recipient": { "phone": "5511999998888", "business_scoped_user_id": "BR.4389531741319467" },
    "accepted": true,
    "delivery_status": "pending"
  }
}
POST/messagesScope: writeOfficial (Meta)Requires Official or Agency plan

Send image, video, document or sticker.

Use media.id from POST /media or a public media.link.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
connection_idrequireduuidOfficial sending number.
recipient.phonerequiredstringPhone with country code.
typerequiredimage | video | document | stickerFile type.
media.idoptionalstringID from POST /media; preferred.
media.linkoptionalURLPublic alternative to media.id.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "content-type: application/json" \
  -d '{
  "connection_id": "<CONNECTION_ID>",
  "recipient": { "phone": "<TELEFONE_COM_DDI>" },
  "type": "image",
  "media": { "id": "<MEDIA_ID>", "caption": "Proposta em anexo" }
}'

Responses

202File accepted; track the wamid.
POST/messagesScope: writeOfficial (Meta)Requires Official or Agency plan

Send audio or voice message.

Upload first and use media.id. Audio has no caption.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
media.idrequiredstringID returned by upload.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "content-type: application/json" \
  -d '{
  "connection_id": "<CONNECTION_ID>",
  "recipient": { "phone": "<TELEFONE_COM_DDI>" },
  "type": "audio",
  "media": { "id": "<MEDIA_ID>" }
}'

Responses

202Audio accepted.
POST/messagesScope: writeOfficial (Meta)Requires Official or Agency plan

Send an approved Meta template.

Use outside the 24-hour window; inspect GET /templates first.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
template.namerequiredstringExact Meta-approved name.
template.componentsoptionalarrayTemplate parameters.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "content-type: application/json" \
  -d '{
  "connection_id": "<CONNECTION_ID>",
  "recipient": { "phone": "<TELEFONE_COM_DDI>" },
  "type": "template",
  "template": { "name": "NOME_DO_TEMPLATE", "language": "pt_BR", "components": [] }
}'

Responses

202Template accepted.
POST/messagesScope: writeOfficial (Meta)Requires Official or Agency plan

Send buttons, list, location, contacts or reaction.

Change type and its native object.

Path parameters

No additional parameters.

Query parameters

No additional parameters.

Body fields
FieldTypeDescription
interactive | location | contacts | reactionoptionalobjectNative content for the selected type.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages" \
  -H "Authorization: Bearer SUA_CHAVE_API" \
  -H "content-type: application/json" \
  -d '{
  "conversation_id": "<CONVERSATION_ID>",
  "type": "location",
  "location": { "latitude": -22.879, "longitude": -43.104, "name": "Local do atendimento" }
}'

Responses

202Special message accepted.
GET/messagesScope: readOfficial + Basic

List messages and provider states.

Filter by connection, conversation, contact, direction, status or WAMID.

Path parameters

No additional parameters.

Query parameters
FieldTypeDescription
connection_idoptionaluuidWhatsApp connection.
conversation_idoptionaluuidInternal conversation.
provider_message_idoptionalstringWAMID/provider message ID.
limitoptionalnumberRecords per page. Default 50; maximum 200 on most list endpoints.
offsetoptionalnumberInitial page index. Use pagination.next_offset to fetch the next page.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X GET "https://connect.zyronstack.com/api/v1/messages?connection_id=<CONNECTION_ID>&provider_message_id=wamid.HBgM..." \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Paginated messages.
GET/messages/:idScope: readOfficial + Basic

Get one message with provider payload.

Read media/interactive metadata without losing the original payload.

Path parameters
FieldTypeDescription
idrequiredintegerInternal log ID.

Query parameters

No additional parameters.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X GET "https://connect.zyronstack.com/api/v1/messages/42" \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Message returned.
POST/messages/:id/readScope: writeOfficial (Meta)

Mark an inbound message as read.

Available for Official connections; uses the WAMID stored in history.

Path parameters
FieldTypeDescription
idrequiredintegerInbound log ID.

Query parameters

No additional parameters.

Body fields

This endpoint does not receive a JSON body.

Ready examples

curl -X POST "https://connect.zyronstack.com/api/v1/messages/42/read" \
  -H "Authorization: Bearer SUA_CHAVE_API"

Responses

200Read confirmed.
422Connection does not support mark-read.