Skip to main content
POST
Assistant WhatsApp Chat

Authorizations

Authorization
string
header
required

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

Headers

Idempotency-Key
string

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.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_-]{1,255}$

Path Parameters

assistant_id
string
required

Unique identifier of the assistant. Must be the assistant configured on the messaging profile of the from number.

Body

application/json
from
string
required

WhatsApp number on your account to send from, in E.164 format. Its messaging profile must have this assistant configured.

to
string
required

Customer to message, as an E.164 phone number or a WhatsApp business-scoped user ID (BSUID).

content
string
required

Instruction for the assistant, including the values for the template variables, e.g. Send the login verification code 482913 to the customer.

conversation_metadata
Conversation Metadata · object

Metadata stored on the conversation. Keys starting with telnyx_ and the assistant_id key are reserved.

Response

Successful Response

conversation_id
string
required

ID of the conversation created for this WhatsApp chat.

message_id
string
required

ID of the WhatsApp template message that was sent.