Assistant WhatsApp Chat
Start a WhatsApp conversation with a customer from the business side. This endpoint:
- Validates that
fromis a WhatsApp number on your account whose messaging profile has this assistant configured - Creates a new
whatsapp_chatconversation with the provided metadata - Asks the assistant to pick one of its approved WhatsApp templates and fill its variables from
content - Sends the template from
fromtoto - Returns the conversation ID and the message ID
When the customer replies, the reply is routed to the same conversation and the assistant answers within the 24-hour customer service window. The assistant needs a whatsapp_template tool with at least one approved template, data retention enabled and PII redaction disabled.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional opaque, unquoted key for safely retrying the same logical request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores. Generate a unique UUID v4 for each operation and reuse it only when retrying that operation with the same request. Invalid headers—including duplicate, empty, malformed, or overlong values—return 400 with error code 10015. A request already in progress with the same key returns 409; reusing the key with a different request returns 422. Only successful responses are replayed, for up to 24 hours. Do not include sensitive data in the key.
1 - 255^[A-Za-z0-9_-]{1,255}$Path Parameters
Unique identifier of the assistant. Must be the assistant configured on the messaging profile of the from number.
Body
WhatsApp number on your account to send from, in E.164 format. Its messaging profile must have this assistant configured.
Customer to message, as an E.164 phone number or a WhatsApp business-scoped user ID (BSUID).
Instruction for the assistant, including the values for the template variables, e.g. Send the login verification code 482913 to the customer.
Metadata stored on the conversation. Keys starting with telnyx_ and the assistant_id key are reserved.