Send a WhatsApp message
Sends a WhatsApp message from one of your registered senders to a recipient, and returns the message with its ID.
A message is either a template, named in template, or free-form, given in content. Send exactly one of the two. A template can be sent at any time. A free-form message can be sent only while the 24-hour service window of the recipient is open, that is, within 24 hours of the last message the recipient sent to the sender. A message sent with content is charged at the service rate. A template message is charged at its category’s rate, inside the window too.
Behavior: Returns 201 with the new message. Poll whatsapp_messages_get for the delivery outcome. A repeat send with the same idempotency_key returns 200 with the original message and sends nothing. Returns 422 when content is sent and the service window is closed. The response then carries service_window_closed_at.
Requires: Your account must have WhatsApp and its sending capability enabled, must have a subscription plan, and must not be blocked or suspended. from must be a sender registered on your account.
Authorizations
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Body
Attributes of the message to send.
Attributes of a WhatsApp message to send. Send exactly one of template and content. Use content only while the 24-hour service window of the recipient is open. Consumed by whatsapp_messages_send.
Key that makes the send safe to retry, unique per account. Matching is exact, so case and accents are significant - ORDER-1 and order-1 are two different keys and both are sent. Printable ASCII only. Must not begin with campaign:, a prefix reserved for campaign messages. A request with a key in that namespace is rejected.
128^[\x20-\x7e]*$"order-1001-shipped"
Content of a message without a template that is text. Consumed in content of Send a WhatsApp message.
- WhatsAppSendTextContent
- WhatsAppSendImageContent
- WhatsAppSendVideoContent
- WhatsAppSendAudioContent
- WhatsAppSendDocumentContent
- WhatsAppSendButtonsContent
- WhatsAppSendListContent