API Documentation

Integrate Cognidom's voice capabilities directly into your applications. Programmatically trigger calls and receive real-time analysis webhooks.

Authentication

Authenticate requests using your API Key via the x-api-key header.
You can manage your API Key in your Profile Settings.

x-api-key: sk_live_...

Make a Call

Trigger an outbound call from a specific agent to a target phone number.

POST/api/calls/single

Request Body

{
  "agentId": "cm...unique_id...",
  "toPhoneNumber": "+919876543210",
  "meta": {
    "campaignId": "optional_campaign_id"
  }
}

Success Response

{
  "success": true,
  "callId": "call_123456789",
  "executionId": "exec_abc123",
  "message": "Call queued and 1-minute charge reserved"
}

Webhooks

Configure a webhook URL in your agent settings to receive real-time analysis data immediately after a call completes.

Payload Structure

Sent as a POST request to your configured URL.

{
  "summary": "The customer was interested in the premium plan...",
  "call_id": "call_123...",
  "agent_id": "agent_456...",
  "from_number": "+1234567890",
  "to_number": "+9876543210",
  "created_time": "2024-03-20T10:00:00Z",
  "end_time": "2024-03-20T10:05:00Z",
  "call_duration_seconds": 300,
  "call_type": "OUTBOUND", // or INBOUND
  "lead_score": 85,
  "customer_intent": "SALES_INQUIRY",
  "customer_information": {
    "name": "John Doe",
    "phone": "+9876543210",
    "location": "New York",
    "language": "English"
  },
  "status": "COMPLETED",
  "goal_alignment": "Met",
  "reasoning": "Customer explicitly asked for pricing...",
  "next_actions": ["Send brochure", "Follow up in 2 days"],
  "emitted_at": "2024-03-20T10:05:05Z"
}