Overview
Assign a WhatsApp AI Agent to a connected WhatsApp Business phone number. Once assigned, all incoming WhatsApp conversations on that number will be handled by the selected AI Agent.Prerequisites
- Bearer Token authentication
- A connected WhatsApp Business phone number
- An existing WhatsApp AI Agent
Request
string
required
Bearer token for authenticated workspace access.
Request Body
string
required
Unique identifier of the connected WhatsApp Business phone number.
string
required
Unique identifier of the WhatsApp AI Agent to assign.
Response
boolean
Indicates whether the request completed successfully.
integer
HTTP status code returned by the API.
string
Confirmation message indicating the agent was assigned successfully.
object
Assignment details.
string
WhatsApp Business phone number that received the agent assignment.
string
Assigned WhatsApp AI Agent ID.
Error Handling
A WhatsApp Business phone number can have only one active AI Agent assigned at a time. Assigning a different agent may replace the existing assignment.
Related endpoints:
GET /api/whatsapp/whatsapp-number— List connected WhatsApp numbers.GET /api/whatsapp/get-whatsapp-agent— List available WhatsApp Agents.PUT /api/whatsapp/remove-agent-in-whatsapp-number/{phoneNumberId}— Remove the assigned agent from a WhatsApp number.

