Start an outbound chat conversation

Create a new outbound WhatsApp or SMS conversation for a chat agent.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
agent_idstringRequiredformat: "uuid"
The ID of the chat agent that will handle the conversation.
channelenumRequired
Outbound messaging channel.
Allowed values:
to_numberstringRequired
Recipient phone number in E.164 format.
from_numberstringRequired
Twilio sender phone number in E.164 format.
initial_messagestringOptional

Freeform opening message. For WhatsApp, this is only valid within the 24-hour customer service window.

templateobjectOptional

Approved Twilio Content Template for WhatsApp outbound messages. Required outside the 24-hour customer service window, optional within it.

custom_variablesmap from strings to anyOptional
Custom prompt variables to inject into the agent configuration for this conversation.

Response

200
statusstring
Whether the request was successful.
responseobject

Errors

400
Bad Request Error