Skip to main content
POST
/
calls
Create a voice call
curl --request POST \
  --url https://api.pamhq.com/v1/calls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "agentSlug": "recall-voice",
  "toNumber": "+15555550199",
  "fromNumber": "+15555550123",
  "dynamicVariables": {
    "customerName": "Ada",
    "dealershipName": "PAM Motors",
    "recallId": "24V-123"
  },
  "metadata": {
    "externalContactId": "contact_123"
  }
}
'
{
  "data": {
    "conversationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "status": "queued"
  },
  "meta": {
    "request_id": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pam.ai/llms.txt

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

Authorizations

Authorization
string
header
default:pk_live_your_api_key
required

API key provided as Authorization: Bearer <key>.

Headers

Idempotency-Key
string
required

Stable key for safely retrying a create request. Replays return the original conversation id and status.

Required string length: 1 - 255

Body

application/json

Select exactly one agent. Use agentSlug for PAM-managed agents, or agentId for a specific custom agent.

agentId
string<uuid>
required

Specific custom agent id.

toNumber
string
required

Phone number in E.164 format.

Pattern: ^\+\d{7,15}$
agentSlug
string

Stable slug for a PAM-managed agent.

Required string length: 1 - 255
fromNumber
string

Required when you use agentSlug. Ignored when the selected agent has a configured phone number.

Pattern: ^\+\d{7,15}$
dynamicVariables
object

String variables resolved into the agent prompt, tools, or opening copy.

metadata
object

Opaque metadata stored with the conversation for reconciliation.

Response

Call accepted for dispatch

data
object
meta
object