Send Messages

Send a transactional WhatsApp message

Send a transactional WhatsApp message. To use this endpoint, you must be integrated with WhatsApp Business, not Twilio. Then you need to create the template in the UI and have it approved by WhatsApp/Meta before sending it.

To send a message, you need to provide a transactional_message_id. This is either the numerical ID of your transactional message template or the Trigger Name that you assigned the template.

You can find your transactional_message_id from the code sample in the Overview tab for your transactional message in the user interface, or you can look up a list of your transactional messages through the App API.

post/v1/send/whatsapp

Headers

X-Workspace-Idinteger
Example:100

The numeric ID of the workspace you want to send a message in. This header is only needed when you authenticate with a service-account bearer token (sa_live_…). Service accounts work across workspaces, so you must supply this header so we know which workspace to send from. You can omit this header when you authenticate with a standard App API key, which is always scoped to one workspace.

Request body

tostring required

The WhatsApp phone number you want to send your message to. Use E.164 format, like +15551234567, or Liquid if you store phone numbers as attributes. The recipient must be able to receive WhatsApp messages.

fromstring

The WhatsApp-approved sender (phone number or sender ID) that your message is from. It must be a WhatsApp-approved sender configured in your workspace. This overrides the template's sender. Use E.164 format for a phone number.

trackedboolean

Whether to track link clicks for this WhatsApp message. Defaults to the transactional message's own tracking setting.

languagestring

Overrides language preferences for the person you want to send your transactional message to. Use one of our supported two- or four-letter language codes.

message_dataobject

An object containing the key-value pairs referenced using liquid in your message.

send_atinteger

A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately.

disable_message_retentionboolean

If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your transactional_message_id.

send_to_unsubscribedboolean

If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your transactional_message_id.

queue_draftboolean

If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message.

Example request

{
  "transactional_message_id": "confirmation code",
  "to": "+15559876543",
  "from": "+15551234567",
  "identifiers": {
    "id": "123456"
  },
  "message_data": {
    "confirmation_code": "123456",
    "account_name": "Jane Doe"
  }
}

Response

Returns a unique ID for the delivery.

delivery_idstring

A unique identifier for the message.

queued_atinteger

A Unix timestamp for when Customer.io accepted and queued your request. For scheduled messages (using send_at), this is when we received your request, not when the message sends.

send_atinteger

For a scheduled message, the Unix timestamp when the message is set to send. Returned only when you provide a future send_at.

Example response

{
  "delivery_id": "85286100-9235-4377-9553-067d72506164",
  "queued_at": 1785878008,
  "send_at": 1785878008
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.