curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/agents/call \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"agent_id": 123,
"phone_number": "<string>",
"metadata": {}
}
'{
"success": true,
"message": "<string>",
"data": {
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": 123,
"phone_number": "<string>",
"call_status": "<string>"
}
}curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/agents/call \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"agent_id": 123,
"phone_number": "<string>",
"metadata": {}
}
'{
"success": true,
"message": "<string>",
"data": {
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": 123,
"phone_number": "<string>",
"call_status": "<string>"
}
}/api/v1/global/agents/call
token: <your_api_token>
api_access_token: <your_api_token>
{
"agent_id": 123,
"phone_number": "+1234567890",
"metadata": {
"customer_id": "CUST001",
"call_reason": "Follow-up",
"order_id": "ORD123"
}
}
| Field | Type | Description |
|---|---|---|
agent_id | integer | ID of the agent to use for the call |
phone_number | string | Phone number to call. Must include country code with + prefix (e.g., +1234567890) |
| Field | Type | Description |
|---|---|---|
metadata | object | Additional metadata to pass with the call. Can include any custom key-value pairs |
200 OK
{
"success": true,
"message": "Call initiated successfully",
"data": {
"execution_id": "550e8400-e29b-41d4-a716-446655440000",
"agent_id": 123,
"phone_number": "+1234567890",
"call_status": "initiated"
}
}
| Field | Type | Description |
|---|---|---|
execution_id | string | Unique identifier for this call execution. Use this to track the call |
agent_id | integer | ID of the agent used for the call |
phone_number | string | Phone number that was called |
call_status | string | Status of the call (“initiated”) |
{
"error": true,
"message": "Phone Number is required"
}
{
"error": true,
"message": "Agent ID is required"
}
{
"error": true,
"message": "Invalid Auth Key or Session Expired"
}
{
"error": true,
"message": "Agent not found or not active"
}
{
"error": true,
"message": "Validation error message"
}
curl -X POST https://www.tryunleashx.com/api/v1/global/agents/call \
-H "Content-Type: application/json" \
-H "token: your_api_token_here" \
-d '{
"agent_id": 123,
"phone_number": "+1234567890",
"metadata": {
"customer_id": "CUST001",
"call_reason": "Follow-up"
}
}'
+ prefix+1234567890, +9198765432101234567890, 919876543210 (missing +)+ prefix if it’s missing, but it’s recommended to include it.
calling_type: 1calling_type: 2| ID | Type | Description |
|---|---|---|
| 1 | Outbound | Agent makes calls to customers. Use this when you want the agent to initiate calls to phone numbers. |
| 2 | Inbound | Agent receives calls from customers. Use this when customers call your phone numbers and the agent answers. |
calling_type is set to 1 (Outbound) for outbound calling scenarios.
execution_id returned in the response for tracking purposesmetadata field is optional but useful for passing contextphone_number is included in the request body.+ prefix (e.g., +1234567890).API token for authentication
Was this page helpful?