Skip to main content

Start WhatsApp Conversations with an AI Assistant

Use POST /v2/ai/assistants/{assistant_id}/chat/whatsapp to reach out to a customer first. The assistant picks one of its approved WhatsApp templates, fills the variables from your content, and Telnyx sends it. When the customer replies, the reply lands in the same conversation and the assistant answers free-form within the 24-hour customer service window.

Prerequisites

  • A connected WhatsApp number on your account. See the quickstart.
  • The assistant set as the AI assistant on that number’s messaging profile. Replies are routed through the profile’s assistant, so a request with any other assistant is rejected.
  • A whatsapp_template tool on the assistant with at least one approved template.
  • Data retention enabled and PII redaction disabled in the assistant’s privacy settings.

Send the first message

The response returns the conversation and the sent template message:
Track delivery of message_id with your usual messaging webhooks, and read the conversation’s messages, including the customer’s reply, with the conversations API.

Errors