Calls
Initiate Call
Starts a real phone call: dials the customer, connects them to the specified assistant, and deducts credits from the authenticated user's account. Provide either assistant_id (uses that assistant's assigned live number) or assigned_number (uses the assistant already assigned to that number) β not both.
Request
/v1/callsx-api-keyorAuthorization: BearerBody Parameters
| Name | Type | Description |
|---|---|---|
customer_numberrequired | string | number | The customer's phone number to call. Must not be empty and must look like a phone number (digits, optionally with a leading +, spaces, hyphens, or parentheses β 4 to 20 characters). Not otherwise reformatted β include the country code for international numbers. |
customer_namerequired | string | Customer's name β used for personalization and passed through to the assistant. 1 to 200 characters. |
assistant_id | ObjectId | Assistant to place the call with, using its assigned live number. Must be a valid id β invalid values are rejected before anything is dialed. Provide this or assigned_number, not both. |
assigned_number | string | number | Your Vomyra phone number to call from β its assigned assistant places the call. Same format rules as customer_number. Provide this or assistant_id, not both. |
customer_country_code | string | Customer's country calling code, digits only with an optional leading + (e.g. "+91", 1 to 4 digits). Optional β improves international-call validation accuracy. |
additional_data | object | Arbitrary context passed through to the assistant and stored on the call record (e.g. order_id, amount). Counts toward the 1 MB request body limit. |
Request Body Example
{
"customer_number": "9876543210",
"customer_name": "John Doe",
"assigned_number": "9123456780",
"additional_data": {
"order_id": "ORD123456",
"amount": 1000
}
}Notes
This places a real call and deducts credits immediately β it is not a demo or simulated call.
Use the returned id with GET /v1/calls/{id} to check status, duration, recording, and transcript once the call ends.
Exactly one of assistant_id or assigned_number is required β sending both, or neither, is rejected with 422 before any call is placed or any credit is spent.
All fields are validated up front (format and required-field checks) β a 422 response means nothing happened yet: no call, no charge. A 402 means validation passed but the account doesn't have enough credit.
Response Example
{
"success": true,
"data": {
"id": "665f1a2b3c4d5e6f7a8b9c0d",
"status": "initiated",
"assistant_number": "+919123456780",
"customer_number": "9876543210",
"provider": "Exotel",
"additional_data": {
"order_id": "ORD123456",
"amount": 1000
}
}
}Status Codes
| HTTP | Meaning | Description |
|---|---|---|
| 201 | Created | Resource was created. |
| 400 | Bad request | Malformed input, invalid ObjectId, or no updatable fields. |
| 401 | Unauthorized | Missing, invalid, inactive, or origin-restricted API key. |
| 402 | Payment required | Insufficient credits, or premium call minutes exhausted. |
| 403 | Forbidden | The requested operation is not available for this resource or tool type. |
| 404 | Not found | Resource was not found inside the authenticated user's scope. |
| 415 | Unsupported media type | Content-Type header is missing or is not application/json. |
| 422 | Validation error | JSON body failed schema or business validation. |
| 429 | Rate limited | Per-IP or per-key request budget was exceeded. |