Create an outbound call to initiate a phone call from a configured phone number to a target number.
Base URL
Endpoint
POST https://api.pathors.com/project/{projectId}/integration/phone/call/outbound
Path Parameters
The unique identifier of your project
Bearer token authentication using your API key. Format: Bearer {your-api-key}
Request Body
The phone number to call from. This number must be configured in your project’s SIP trunking settings with outbound status set to ‘active’
The phone number to call to. Should be in E.164 format (e.g., +1234567890). For Taiwan phone numbers, use local format without the +886 country code prefix (e.g., 0912345678).
Optional dynamic variables to pass to the call. These variables can be used in your call flow configuration
Example request:
curl -X POST \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"fromNumber": "+1234567890",
"toNumber": "+0987654321",
"dynamicVariables": {
"customerName": "John Doe",
"orderId": "12345"
}
}' \
https://api.pathors.com/project/proj_abc123/integration/phone/call/outbound
Response
Returns a success response indicating the outbound call event was created.
Indicates whether the call event was created successfully
Example response:
Error Responses
| Status Code | Description |
|---|
| 400 | Missing required fields (fromNumber or toNumber) or invalid request body |
| 401 | Invalid authentication (API key is invalid or missing) |
| 404 | The given phone number (fromNumber) is not configured for outbound calls or the outbound status is not active |
| 409 | The target phone number (toNumber) is already in the call queue |
| 500 | Internal server error |
Example error response:
{
"error": "The given phone number is not configured for outbound"
}
Usage Notes
-
Phone Number Configuration: The
fromNumber must be configured in your project’s SIP trunking settings with:
- Outbound SIP status set to ‘active’
-
Call Queue: Each
toNumber can only have one active call in the queue at a time. If you attempt to create a call to a number that’s already queued, you’ll receive a 409 error.
-
Dynamic Variables: Use
dynamicVariables to pass custom data to your call flow. These variables are available throughout the call session and can be used for personalization or call routing logic.