Skip to main content

Create Dispatch

Create an outbound call. Authentication: Requires X-API-Key header Required Fields:
  • agent_name: Agent name to handle the call
  • contact_number: Contact number with country code (e.g., +919876543210)
  • name: Customer name
  • voice: Voice preference (optional, default: "")
  • metadata: Additional metadata (optional, default: )

Request Body

The request body should be a JSON object with the following structure:
{
  "agent_name": "string",
  "contact_number": "string",
  "name": "string",
  "voice": "string",      // optional, default: ""
  "metadata": {}          // optional, default: {}
}

Request Example

curl -X POST 'https://api.vaaniresearch.com/api/trigger-call/' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "agent_name": "sales-agent",
    "contact_number": "+919876543210",
    "name": "John Doe",
    "voice": "",
    "metadata": {}
  }'

Response

Success Response (200)

success
boolean
required
Whether the operation succeeded
message
string | null
Status message. Default: “Command processed”
output
string | null
Command output (typically the call ID or related information)
error
string | null
Error message if the operation failed
{
  "success": true,
  "message": "Command processed",
  "output": "call_id_12345",
  "error": null
}

Validation Error Response (422)

{
  "detail": [
    {
      "loc": ["body", "contact_number"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}
detail
array
Array of validation error details