Skip to main content
POST
Create WhatsApp AI Agent

Authorizations

Authorization
string
required
Enter your ContactSwing JWT Bearer token.

Request Body

name
string
required
Assistant display name. Example: "My WhatsApp AI Agent"
type
string
required
Assistant type: "WHATSAPP"
model
string
required
LLM model: "cw-llm-1"
api_keys
string[]
API key configuration []
instructions
string
required
Detailed agent instructions and restaurant ordering guidelines
prompts
object
Agent prompts with agent and goal fields
agent
string
goal
string
phone_number
string
required
WhatsApp number ID. Example: "650175178190170"
kb_id
string
Knowledge base ID

WhatsApp Settings

action_ids
string[]
Linked action IDs []
additional_settings
object
Idle timeout in hours. Example: 24
idle_time
integer
Idle timeout in hours. Example: 24
max_messages
integer
Maximum messages per conversation. Example: 10
incoming_call_greeting
string
WhatsApp greeting message

Response

201 Created - WhatsApp assistant created successfully
ctx_id
string
Request context ID
data
object
assistant_id
string
New assistant ID
name
string
Assistant name
400 Bad Request - Invalid WhatsApp configuration 401 Unauthorized - Invalid token