Enable voice agents via API for Platform customers who manage multiple WhatsApp configurations.

Enable voice calling

Update the WhatsApp config to enable calls:
curl -X PATCH https://app.kapso.ai/api/v1/whatsapp_configs/{whatsapp_config_id} \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "whatsapp_config": {
      "calls_enabled": true
    }
  }'

Create voice agent

curl -X POST https://app.kapso.ai/api/v1/voice_agents \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice_agent": {
      "name": "Support Agent",
      "provider": {
        "kind": "pipecat",
        "agent_name": "support-v1",
        "public_api_key": "YOUR_PIPECAT_KEY",
        "base_url": "https://your-agent.pipecat.daily.co"
      }
    }
  }'

Assign voice agent to WhatsApp config

Link the voice agent to a customer’s WhatsApp number:
curl -X POST https://app.kapso.ai/api/v1/voice_agents/{voice_agent_id}/voice_agent_whatsapp_configs \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "voice_agent_whatsapp_config": {
      "whatsapp_config_id": "{whatsapp_config_id}",
      "is_primary": true,
      "enabled": true
    }
  }'
Rules:
  • is_primary: true — one primary assignment per WhatsApp number
  • enabled: true — assignment must be enabled to handle calls

Monitor calls

Fetch call history:
curl https://app.kapso.ai/api/v1/whatsapp_calls?voice_agent_id={voice_agent_id} \
  -H "X-API-Key: YOUR_API_KEY"
Filter by status, direction, or time range using query parameters.