Skip to main content

Overview

Create a WhatsApp Agent that can automatically respond to customer messages on an integrated WhatsApp Business number. The agent can be configured with prompts, AI models, knowledge bases, templates, and conversation settings.

Prerequisites

  • Bearer Token authentication
  • At least one integrated WhatsApp Business number
  • (Optional) Knowledge Base created
  • (Optional) WhatsApp templates configured

Request

string
required
Bearer token for authenticated workspace access.

Request Body

string
required
Name of the WhatsApp AI Agent.
string
required
WhatsApp Business Phone Number ID that the agent will be assigned to.
string
required
Primary instructions that define the behavior of the AI agent.
string
Message automatically sent when a new conversation starts.
array[string]
List of Knowledge Base IDs the agent can use while answering questions.
string
AI model used for generating responses.
number
Controls the creativity of the AI responses.

Response

boolean
Indicates whether the request was successful.
integer
HTTP status code.
string
Success message returned by the API.
object
Information about the newly created WhatsApp Agent.
string
Unique identifier of the WhatsApp Agent.
string
Name of the WhatsApp Agent.
string
WhatsApp Business Phone Number assigned to the agent.
string
Current status of the agent.
string
Timestamp when the agent was created.

Error Handling

A WhatsApp Agent must be associated with an integrated WhatsApp Business number before it can start responding to incoming messages.
Typical workflow:
  1. Validate the WhatsApp number.
  2. Create the WhatsApp integration.
  3. Create the WhatsApp Agent.
  4. Assign the agent to the integrated number.
  5. Test the agent by sending a WhatsApp message.