Developer
API
Trigger AI calls, receive results, generate voice notes, and retrieve call analytics through one straightforward REST API.
API reference
Everything you need to authenticate, send your first request, and connect Callbook AI to your existing stack.
REST APICallbook AI - Call Trigger API (1.0.0)
Download OpenAPI specification:Download
This API allows triggering calls to customers through Callbook AI's assistant system. Calls are initiated using an assistant ID and must include the phone number as a required field. After the call, Callbook AI can send results to a provided webhook URL.
Trigger a new call
Initiates a new call using a specific assistant ID.
The request body must contain at least a phone number.
Optionally, a callback_url can be provided where Callbook AI will send call results after completion.
Authorizations:
path Parameters
| ASSISTANT_ID required | string Example: assistant_123456 The unique identifier of the assistant initiating the call. |
Request Body schema: application/jsonrequired
| phone | string The customer's phone number (required). |
| name | string The customer's name (optional but recommended). |
| callback_url | string <uri> (Optional) A webhook URL where Callbook AI will send the call results after completion. |
| next_payment | string (Optional) The customer's next payment date. |
| last_purchase_date | string (Optional) The last date of purchase. |
| product_interest | string (Optional) The product or service the customer is interested in. |
| location | string (Optional) The customer's location. |
Responses
Response Schema: application/json
| status | string |
| call_id | string |
Request samples
- Payload
{- "phone": "+14155552671",
- "name": "John Doe",
- "next_payment": "2025-02-10",
- "last_purchase_date": "2025-01-15",
- "product_interest": "Premium Plan",
- "location": "New York"
}Response samples
- 200
{- "status": "success",
- "call_id": "call_789456"
}Retrieve call statistics by client ID
Retrieves calls from the database for a given client_id inside crm_data.
Returns the number of calls, total duration, and breakdown of statuses (e.g., finished, unanswered, failed).
Authorizations:
path Parameters
| client_id required | string Example: ac8238ec-1689-40d0-8bd8-18af6141f5f5 The unique client ID associated with the calls. |
Responses
Response Schema: application/json
| client_id | string The client ID queried. |
| total_calls | integer Total number of calls for this client. |
| total_duration | integer Sum of all call durations (in seconds). |
object |
Response samples
- 200
{- "client_id": "ac8238ec-1689-40d0-8bd8-18af6141f5f5",
- "total_calls": 5,
- "total_duration": 350,
- "status_counts": {
- "finished": 3,
- "unanswered": 1,
- "failed": 1
}
}Receive call results
This endpoint should be implemented by clients to receive call results from Callbook AI.
If a callback_url was provided when triggering the call, Callbook AI will send a POST request to it with the following structure.
Request Body schema: application/jsonrequired
| call_id | string The unique identifier of the call. |
| assistant_id | string The assistant that handled the call. |
Array of objects The transcription of the conversation. | |
object Key-value pairs with additional call metadata. |
Responses
Response Schema: application/json
| phone_number | string |
| country_code | string |
| whole_number | string |
| duration | integer |
| status | string |
| audio | string |
| phone | string |
| name | string |
| voicemail | string |
| user_asked_to_be_called_again | string |
Request samples
- Payload
{- "call_id": "call_789456",
- "assistant_id": "assistant_123456",
- "transcription": [
- {
- "speaker": "user",
- "text": "Hello, I need help with my order."
}
], - "variables": {
- "voicemail": true,
- "call_duration": 45,
- "custom_field_1": "Custom Value",
- "custom_field_2": "Another Value"
}
}Response samples
- 200
{- "phone_number": "3151234567",
- "country_code": "57",
- "whole_number": "+573151234567",
- "duration": 5,
- "status": "finished",
- "phone": "+573151234567",
- "name": "Carolina",
- "voicemail": "NO",
- "user_asked_to_be_called_again": ""
}Generate a new voice note
Generates a voice note based on the provided text and voice ID, returning an OGG file URL.
Authorizations:
Request Body schema: application/jsonrequired
| vid | string UUID of the voice. |
| text | string The text to be converted into a voice note. |
| client_id | string UUID of the client requesting the voice note. |
Responses
Response Schema: application/json
| id | string The unique identifier of the generated voice note. |
| path | string URL to the generated voice note. |
| duration | integer Duration of the generated voice note in seconds. |
| client_id | string The client ID associated with the request. |
Request samples
- Payload
{- "vid": "vid_6c859031-ed4c-4ed3-9134-6bdc6b69b90c",
- "text": "Hello, welcome to Callbook AI.",
- "client_id": "ac8238ec-1689-40d0-8bd8-18af6141f5f5"
}Response samples
- 200
{- "id": "vn_123456789",
- "duration": 10,
- "client_id": "ac8238ec-1689-40d0-8bd8-18af6141f5f5"
}Retrieve available voices
Retrieves a list of available voices that can be used to generate voice notes.
Responses
Response Schema: application/json
| message | string |
Array of objects |
Response samples
- 200
{- "message": "List of voices",
- "voices": [
- {
- "country": "MX",
- "gender": "female",
- "subDetail": "1",
- "vid": "vid_6c859031-ed4c-4ed3-9134-6bdc6b69b90c"
}
]
}