POST /cp/meta/whatsapp/outbound sends an approved template from your WhatsApp agent’s number and opens a chat, so you can message a customer first: after a missed call, a form submission or ahead of a renewal. There is no dashboard equivalent.
A template is required because WhatsApp allows free-form messages only within 24 hours of the customer’s last message (Message templates).
This chapter is the two ways to put a WhatsApp agent in front of customers from your own systems: this page, and WhatsApp Relay, which runs the agent on a number that stays in your own Meta account.
Before you start
A WhatsApp agent
With a number attached: it answers when the customer replies.
An approved template
Ready on the connected WhatsApp Business account that holds the number.
An API key
Sent in the
X-API-KEY header.Send the first message
Headers
string
A unique value per message: letters, digits,
_ and -, up to 128 characters. A retry with the same key within 24 hours returns the first response and doesn’t send the template again. 408, 409 and 5xx responses are not stored, so a retry after one of them is processed as a new request.Request body
string
required
The customer’s number in international format, without
+.string
required
Meta’s phone number ID for the WhatsApp number your agent is attached to.
string
required
Your workspace ID (a UUID).
string
required
The WhatsApp agent attached to that number. It must match, or the request fails with
409.object
required
object
Values for your agent’s custom variables, such as
{{name}}. Defaults to {}. Every event for this chat carries them in custom_args_values, with source: "chat" added, and mobile_number too if you didn’t send one.422.
Responses
What happens next
- The template appears as the agent’s first message in the chat, under Logs → WhatsApp.
- When the customer replies, including by tapping a quick-reply button on the template, the agent answers in the same chat, with the template in context.
- The chat then follows the agent’s session timeouts and closes like any other chat, firing the events you subscribed to.
Next steps
Read the chat in Logs
Find it under Logs → WhatsApp.
Get chat webhooks
Receive the transcript and analysis when the chat closes.