Skip to main content
POST
/
voice_agents
/
{voice_agent_id}
/
whatsapp
/
phone_numbers
Assign WhatsApp phone number
curl --request POST \
  --url https://api.kapso.ai/platform/v1/voice_agents/{voice_agent_id}/whatsapp/phone_numbers \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "voice_agent_whatsapp_config": {
    "phone_number_id": "123456789012345",
    "is_primary": false,
    "enabled": true
  }
}'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "voice_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "phone_number_id": "123456789012345",
    "is_primary": true,
    "enabled": true,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

voice_agent_id
string<uuid>
required

Voice agent identifier

Body

application/json

Request to create or update a WhatsApp phone number assignment for a voice agent

voice_agent_whatsapp_config
object
required

Response

Assignment created successfully

Single WhatsApp phone number assignment response

data
object
required

WhatsApp phone number assignment to a voice agent. Defines which WhatsApp numbers route voice calls to which voice agents. Uses flat structure with no nested objects.