v1
latestOpenAPI 3.0.02026-07-2491237338.9 KBEnqueue a message
Enqueues an outbound WhatsApp message for sending.
Queued messages will be submitted to the WhatsApp Business API asynchronously.
For WhatsApp template messages, the referenced template must be in APPROVED status. ARCHIVED templates cannot be sent.
Request body
The sender's phone number in E.164 format.
The recipient's phone number in E.164 format. Required when recipient is not provided.
The recipient's WhatsApp Business-scoped user ID (BSUID) or parent BSUID. Required when to is not provided.
WhatsApp outbound message type. See also WhatsApp messages.
A unique (recommended) string to reference the object. This can be an order number or similar, and can be used to reconcile the object with your internal systems.
Optional. Indicates the category of the message to be sent with Direct Send. Supported values are utility and authentication.
Use utility for business-initiated utility messages. Messages sent with utility are charged at utility rates.
Use authentication for business-initiated authentication messages. Messages sent with authentication are charged at authentication rates. Authentication Direct Send only supports text messages.
Optional. Message time-to-live in seconds for Direct Send utility or authentication messages.
The supported range is 30 seconds to 43200 seconds (12 hours). If omitted, the default Direct Send TTL is used.
Optional. Whether to send the message through Direct Send. Defaults to false.
Set this to true to send the message through Direct Send when the sender WABA is enabled for Direct Send.
For template messages, the template must be convertible to a Direct Send message type. Supported Direct Send message types for template conversion are:
- Text messages
- Interactive Call-to-Action URL button messages
- Interactive reply button messages
Optional. If set to true, the message will not be sent to users who have unsubscribed from your account. Defaults to false.
Only use for POST /v2/whatsapp/messages. If the user has unsubscribed, we will push webhook notifications with whatsappMessage.errorCode set to RECIPIENT_UNSUBSCRIBED.
Not applicable to POST /v2/whatsapp/messages/sendDirectly.
Optional. If set to true, the message will not be sent to users in your block list. Defaults to false.
Only use for POST /v2/whatsapp/messages. If the user is in your block list, we will push webhook notifications with whatsappMessage.errorCode set to RECIPIENT_IN_BLOCK_LIST.
Not applicable to POST /v2/whatsapp/messages/sendDirectly.
Response
The request is successfully accepted.
Unique ID of the message.
The original message ID on WhatsApp's platform.
WhatsApp Business Account ID.
The sender's phone number in E.164 format.
The recipient's phone number in E.164 format.
The recipient value submitted in the request when a BSUID or parent BSUID was used.
The recipient's WhatsApp Business-scoped user ID (BSUID).
Alias of recipientUserId kept for compatibility.
The recipient's parent WhatsApp Business-scoped user ID.
Alias of parentRecipientUserId kept for compatibility.
WhatsApp outbound message type. See also WhatsApp messages.
A unique (recommended) string to reference the object. This can be an order number or similar, and can be used to reconcile the object with your internal systems.
WhatsApp message status. One of accepted, failed, sent, delivered, read.
- accepted: The messaging request is accepted by our system.
- failed: A message sent by your business failed to send.
- sent: A message sent by your business is in transit within WhatsApp's systems.
- delivered: A message sent by your business was delivered to the user's device.
- read: A message sent by your business was read by the user.
Error code when the message status is failed.
Error message when the message status is failed.
The time at which this message is created, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.
The time at which this message is updated, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.
The time at which this message status changed to sent, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.
The time at which this message status changed to delivered, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.
The time at which this message status changed to read, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.
Total price of this message. Note: It's only an estimated price when the status is accepted or sent. It becomes the final price after the message is delivered, i.e., the status is delivered or read.
Price currency. ISO 4217 currency code.
The region code of the recipient phone number.
WhatsApp pricing category.
- referral_conversion: Indicates a free entry point conversation.
- authentication: Indicates the conversation was billed at authentication rate.
- authentication_international: Indicates the conversation was conversation was billed at the authentication-international rate.
- marketing: Indicates the conversation was billed at authentication rate.
- marketing_lite: Indicates the conversation was billed at marketing-lite rate.
- utility: Indicates the conversation was billed at utility rate.
- service: Indicates the conversation was billed at service rate.
See also Conversation-Based Pricing.
WhatsApp pricing model.
- PMP: Per-message pricing applies.
- CBP: Conversation-based pricing applies.
WhatsApp pricing type. This field is only available in PMP (Per-Message Pricing) mode.
- regular: Indicates the message is billable.
- free_customer_service: Indicates the message is free because it was either a utility template message or non-template message sent within a customer service window.
- free_entry_point: Indicates the message is free because it is part of a free-entry point conversation.
This can be either empty or one of whatsapp, or verify. Defaults to whatsapp.
- whatsapp: Indicates that the message is sent via the WhatsApp product.
- verify: Indicates that the message is sent via the Verify product.
The verification ID. Included only when bizType is verify.