Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.z-api.io/llms.txt

Use this file to discover all available pages before exploring further.

Webhook Response

Response Attributes

All On Send webhook responses contain the following attributes:
phone
string
Destination phone number of the message
messageId
string
Message identifier on WhatsApp
zaapId
string
Message identifier within the conversation
instanceId
string
Instance identifier
momment
integer
Moment when the event was triggered (timestamp in milliseconds)
type
string
Type of the instance event, in this case it will always be DeliveryCallback
error
string
Present only in error cases. Contains the description of the error that occurred when sending the message

Return Examples

Success

When the message is successfully sent, the response does not include the error field:
{
  "phone": "554499999999",
  "messageId": "A800FB3697F1DE58C48D",
  "instanceId": "instance.id",
  "zaapId": "A20DA9C0183A2D35A260F53F5D2B9244",
  "momment": 1777494009341,
  "type": "DeliveryCallback"
}

Error

When an error occurs during sending, the response includes the error field with the problem description:
{
  "phone": "554499999999",
  "messageId": "A20DA9C0183A2D35A260F53F5D2B9244",
  "error": "Phone number does not exist",
  "instanceId": "instance.id",
  "zaapId": "A20DA9C0183A2D35A260F53F5D2B9244",
  "momment": 1777494091684,
  "type": "DeliveryCallback"
}
It is not possible to filter the events received by the webhook. All send events — whether success or error — are triggered together, without distinction at dispatch time. Handling must be done in your application by checking the presence or absence of the error field in the received payload.

Possible Errors in the error Field

WhatsApp Permissions and Restrictions

WhatsApp blocked the sending of this message due to permission restrictions.
WhatsApp rejected the send. This may occur due to account restrictions, such as shadow ban or limitations on starting conversations.
WhatsApp did not allow sending this message.
Your account does not have permission to send this message.
You do not have permission to send messages in this group.
This type of message can only be sent in groups, not in private chats.
You must accept the button message terms in the panel before sending this message.

Timeout and Connection

The time to send the message has expired. This may happen due to instability in the connection with WhatsApp.
A connection error occurred in the system while trying to send the message.

Invalid Phone Number

The provided phone number does not exist on WhatsApp.
The phone number format is invalid. Please check and try again.

Media and URL

The media URL (image, video, audio, or document) is invalid or inaccessible.
The media URL was not found (404 error). Check if the link is correct.
The provided URL does not point to a media file. It returns a webpage instead of a file.
The sticker file format is not supported. WhatsApp only accepts images as stickers.

Message Editing and Time Limits

It is not possible to edit a message sent more than 7 days ago. WhatsApp only allows edits within this time frame.
It is not possible to comment on a message sent more than 7 days ago.

Products and Catalog

The provided product ID was not found. Check if the product exists in your catalog.
The provided catalog was not found. Check if the catalog is properly configured.
The phone number used to fetch the product cannot be a temporary identifier. Use the real phone number.

Orders

The currency code provided in the order is invalid. Use a valid currency code (e.g., BRL, USD).
The data sent to update the order is invalid. Check the information and try again.

Events and Newsletter

The poll vote could not be sent because the poll identifier is missing.
Event messages can only be sent in groups, not in private chats.
The provided event date and time are invalid. Check the format and try again.

Status and Replies

The original status message you tried to reply to was not found.

Forwarding

The message you tried to forward was not found. It may have been deleted.

Conversion and Parameters

An error occurred while converting the message to a WhatsApp-compatible format.
The request parameters are invalid. Check the data and try again.

Unsupported Message Types in Channels (Newsletters)

It is not possible to modify chat settings in channels.
Calls are not available for channels.
Calls with audio are not available for channels.
Documents cannot be sent to channels.
Button responses cannot be sent to channels.
PTV videos cannot be sent to channels.
Location messages cannot be sent to channels.
Contacts cannot be sent to channels.
Button actions cannot be sent to channels.
Messages with buttons cannot be sent to channels.
Option lists cannot be sent to channels.
Payment requests cannot be sent to channels.
Chat expiration cannot be configured in channels.
Messages cannot be pinned in channels.
Pix buttons cannot be sent to channels.

Queue Processing Failure

The message was received by the system, but an internal failure occurred during queue processing. The message was not added to the sending queue.