Skip to main content
POST
/
v1
/
calls
/
outbound
Create Outbound Call
curl --request POST \
  --url https://api.pathors.com/v1/calls/outbound \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "fromNumber": "<string>",
  "toNumber": "<string>",
  "dynamicVariables": {}
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.pathors.com/llms.txt

Use this file to discover all available pages before exploring further.

Creates an outbound call request. The call is queued and dispatched by the outbound scheduler; this endpoint returns as soon as the request is accepted, not when the call is connected. The agent used for the call is automatically resolved from the project — there is no agent selector. Each project corresponds to one agent.

Request

POST https://api.pathors.com/v1/calls/outbound

Headers

Authorization
string
required
Bearer token using your developer key (dk_...).

Body

projectId
string
required
The project that will own this call. The authenticated user must be a member of this project.
fromNumber
string
required
The source phone number. Must be active in a number pool that the authenticated user is a member of, and must have an outbound trunk configured.
toNumber
string
required
The destination phone number, in E.164 format (e.g. +886912345678).
dynamicVariables
object
Optional key-value map injected into the agent session as runtime variables. Values can be referenced from your pathway and prompts.

Example

curl -X POST https://api.pathors.com/v1/calls/outbound \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "proj_abc123",
    "fromNumber": "+886912345678",
    "toNumber": "+886987654321",
    "dynamicVariables": {
      "customerName": "Jane Doe",
      "orderId": "12345"
    }
  }'

Response

Returns 200 OK once the call request is accepted into the dispatch queue.
{
  "success": true
}

Errors

StatusWhen
400Validation error, or fromNumber exists but is not active
401Missing or invalid developer key
402Project has insufficient credits to start an outbound call
403The user has no access to projectId, or fromNumber does not belong to a number pool the user is a member of
404fromNumber is not found, or has no outbound trunk configured
409An outbound call to this toNumber is already in flight
500Internal server error

Notes

  • Agent: The agent is resolved from projectId automatically. The configured agent for that project will handle the call.
  • From-number ownership: The caller (developer key user) must be a member of the number pool that owns fromNumber. Project membership is checked separately for projectId.
  • Variables: dynamicVariables are stringified into the LiveKit room metadata and made available to the agent for the duration of the session.
  • Concurrency: The same toNumber cannot have more than one in-flight outbound call at a time. Wait for the previous call to complete before retrying.