Skip to Content
CallHumanDocs
API reference

Create a call

POST
/calls

Calls the person and reads the message. With options, the person answers by keypress or voice and you get the chosen option back. Only transactional calls are allowed: before calling we check what the person will hear and reject marketing, sales, scams and unsolicited messages (call_not_allowed). See https://www.callhuman.es/docs/allowed-use. Validation order: 401 → 402 → 403 → 429 → 422.

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, for example Authorization: Bearer ch_live_xxxxxxxxxxxx. Create keys in your dashboard under API keys.

Header Parameters

Idempotency-Key?string

Optional unique key, any string up to 255 characters (for example booking-1042-confirmation or a UUID). Repeating a request with the same key within 24 hours returns the original response — even if the body changed — and never places a second call.

Lengthlength <= 255

Request Body

application/json
  1. body

Send only to and message for a one-way message (for example a verification code). Add options to ask a question and get the answer back.

to*string

Phone number to call, in international E.164 format (with + and country code). Must be in a supported country.

Match^\+[1-9]\d{6,14}$
message*string

Text read out loud when the person answers. Your plan limits the total length of message plus every label and reply.

Length1 <= length
options?array<>

Options the person can choose, by keypress or by voice. Up to 9 per menu. Omit it for a one-way message: the text is read once and the call ends (one attempt, no retries).

Items1 <= items <= 9
language?string

Language the message and menus are read in (ISO 639-1 code). Defaults to en. Common: en, es, fr, de, it, pt. An unsupported code returns invalid_request listing the supported ones.

Default"en"
webhook_url?string

HTTPS URL (max 2,048 characters) that receives the result as a JSON POST (see the callResult webhook). Optional: you can also poll GET /calls/{id}.

Match^https://
Formaturi
Lengthlength <= 2048
metadata?

Any JSON object you want back (max 4 KB serialized), returned unchanged in the result. Typically your own record ID.

Response Body

Call accepted. The result arrives at webhook_url or via GET /calls/{id}.

application/json
  1. response
id*string

Call ID. Use it with GET /calls/{id}.

status*string

Always queued when created.

curl -X POST 'https://api.callhuman.es/v1/calls' \  -H 'Idempotency-Key: bk_1042-reminder' \  -H 'Content-Type: application/json' \  -d '{  "to": "+34600111222",  "language": "en",  "message": "Hi! This is La Plaza about your table for 4 tonight at 8:30 pm.",  "options": [    {      "label": "Confirm",      "reply": "Perfect, see you tonight!"    },    {      "label": "Cancel",      "reply": "No problem, your booking is cancelled."    }  ],  "webhook_url": "https://laplaza.example/hooks/callhuman",  "metadata": {    "booking_id": "bk_1042"  }}'
Example Response
{  "id": "call_x9f2k",  "status": "queued"}