Skip to main content
POST
https://api.pathors.com
/
project
/
{projectId}
/
integration
/
phone
/
call
/
outbound
Create Call
curl --request POST \
  --url https://api.pathors.com/project/{projectId}/integration/phone/call/outbound \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromNumber": "<string>",
  "toNumber": "<string>",
  "dynamicVariables": {}
}
'
{
  "success": true
}
Create an outbound call to initiate a phone call from a configured phone number to a target number.

Base URL

https://api.pathors.com

Endpoint

POST https://api.pathors.com/project/{projectId}/integration/phone/call/outbound

Path Parameters

projectId
string
required
The unique identifier of your project

Headers

Authorization
string
required
Bearer token authentication using your API key. Format: Bearer {your-api-key}

Request Body

fromNumber
string
required
The phone number to call from. This number must be configured in your project’s SIP trunking settings with outbound status set to ‘active’
toNumber
string
required
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).
dynamicVariables
object
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.
success
boolean
Indicates whether the call event was created successfully
Example response:
{
  "success": true
}

Error Responses

Status CodeDescription
400Missing required fields (fromNumber or toNumber) or invalid request body
401Invalid authentication (API key is invalid or missing)
404The given phone number (fromNumber) is not configured for outbound calls or the outbound status is not active
409The target phone number (toNumber) is already in the call queue
500Internal 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.