Make A Call
This endpoint initiates a test call using the specified AI agent and phone numbers.Endpoint Details
- URL:
/v1/calls/make-call
- Method:
POST
- Authentication: Required (
API KEY
orJWT Token
) - Source:
src/api/public_apis_v1/call/test_call/test_call_controller.rs
Request Headers
Header | Value | Description |
---|---|---|
Authorization | Bearer <api_key> | Your API KEY or JWT Token |
Body Details
Field | Type | Description | Example |
---|---|---|---|
ai_agent_id | String (UUID format) | The unique identifier for the AI agent initiating the call. | "550e8400-e29b-41d4-a716-446655440000" |
call_from | String | The phone number to call from. Supports various formats including E.164 and national formats. | "+1234567890" or "(123) 456-7890" |
call_to | String | The phone number to call. Supports various formats including E.164 and national formats. | "+9876543210" or "987-654-3210" |
dynamic_variables | Array of Objects (optional) | A list of name-value pairs representing dynamic variables that can influence the behavior of the call. | [{"name": "customer_name", "value": "John"}] |
workspace | String (optional) | The workspace identifier. Defaults to “default” if not provided. | "production" or "staging" |
Validation Rules
Phone Number Formats
Bothcall_from
and call_to
accept various phone number formats:
- E.164 format:
+1234567890
- National formats:
(123) 456-7890
,123-456-7890
- With dots:
123.456.7890
- With spaces:
123 456 7890
- With extensions:
1234567890 ext 123
- International with separators:
+1 (123) 456-7890
Dynamic Variables
- Variable names must not be empty
- Variable names cannot contain spaces
- Variable values must not be empty
Workspace
- If provided, must not be empty
- Maximum length: 100 characters
Example Request
Response
Success Response
- Status Code:
200 OK
Error Responses
Validation Error
- Status Code:
400 Bad Request
Service Error
- Status Code:
400 Bad Request
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Test call configuration data
Data required to make a test call
The unique identifier for the AI agent initiating the call
The phone number to call from. Supports various formats including E.164 and national formats
The phone number to call. Supports various formats including E.164 and national formats
A list of name-value pairs representing dynamic variables that can influence the behavior of the call
The workspace identifier. Defaults to 'default' if not provided