Renders a message template and sends it to the specified recipient,
initiating a conversation proactively. No ticket is created; a ticket is
created once the recipient replies.
The ticket that reply creates holds the reply, not the template that
prompted it: the sent message belongs to the conversation rather than to
any ticket. The same applies to a ticket that is already open when you
send, so do not expect the message to appear on it either. Read the full
exchange with the ticket messages endpoint using scope: 'Channel',
which returns every message on the conversation, including the ones that
no ticket holds.
That read needs a ticket, so it is available only after the guest has
replied, and your bot must be assigned to that ticket, or be on the view
it is assigned to. Assignment rules normally arrange this when the reply
arrives; until then the call answers TicketNotAccessible.
SMS is available wherever a sending number is provisioned. WhatsApp
requires the number to be connected through the direct WhatsApp
integration; a number served by the earlier provider answers
ServiceNotFound until it has been migrated.
Every failure response carries the same error shape: a machine-readable
code to branch on, and a human-readable message explaining it, whose
wording may change. The codes are:
BadRequest(400): the request body is invalid; details inmessage.ServiceNotFound(400): no sending service (e.g. phone number) with this number exists on the organisation.TemplateNotFound(400): no template with this uuid is visible to the organisation.TemplateNotApproved(400): the WhatsApp template is not (or no longer) approved by Meta.InvalidTemplate(400): the template cannot be sent because it is authored for a different channel, or its content cannot be rendered.InvalidSender(400): the sender is not a valid phone number.InvalidRecipient(400): the recipient is not a valid phone number.RenderError(400): the supplied variables do not satisfy the template;problemslists every path at fault, once each, and says whether it is absent or was sent as a flattened dotted key.RenderUnavailable(502): the template could not be rendered because the rendering service was unreachable or failed. Nothing was sent, so the request can be retried.DeliveryFailed(502): the message provider rejected the send.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||