Place Call

Calls

Place Call

Your agent rings a customer, opens with your purpose (spoken aloud, so 300 characters or fewer), then holds a normal conversation. A number that is not a contact yet becomes one with the name and source you send; someone who opted out or is on your do-not-call list is refused. Outside the calling hours you set with callingHours (any hour of any day when you set none), in the customer's own time, or with scheduledAt, the call is queued and answers status: "scheduled" with a sch_… id; otherwise it rings now with an out_… id. Each call is billed from your balance, refused with 402 when it cannot pay, held to your plan's concurrent lines and 60 requests a minute; what it learned arrives as call.analysed or from Get Call. Needs a full key.

POST/calls

Headers

Idempotency-Keystring
Any unique string. A retry with the same key within 24 hours returns the first request's answer instead of acting twice.
Katexs-Workspacestring
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.

Request body

tostringrequired
The customer's number. Include the + and the country code (a leading 00 works too); spaces are fine. A number without its country code is refused: nothing is assumed about the country.
purposestringrequired
Why you are calling, as you would say it — the first thing the customer hears. 300 characters or fewer.
agentstring
Which agent calls — its ag_… id or its name. Needed only when more than one agent answers the phone.
idempotencyKeystring
The same as the Idempotency-Key header, for clients that cannot set headers. The header wins.
namestring
The lead's name. A number that is not a contact yet becomes one with this name; an existing contact's name is never overwritten.
sourcestring
Where the lead came from, e.g. 99acres enquiry form — recorded on a new contact.
referencestring
Your own id for this lead, never interpreted. It comes back on the response, every report and both call webhooks.
variablesobject
Values the agent's instructions use as {{name}}. Up to 20; names are lower-cased with spaces turned into _, values cut to 150 characters. When the number is a contact of yours, its name, first_name, phone and email are filled in underneath — a value you send here wins — and the agent is told who it is speaking with.
callingHoursobject
When this person may be rung, in their own time. Leave it out and the call may ring at any hour of any day.
callingHours.startstring
Opening time, HH:MM, earlier than end. Default: 00:00.
callingHours.endstring
Closing time, HH:MM, later than start. 24:00 is the end of the day. Default: 24:00.
callingHours.daysstring[]
The weekdays calls may be placed on. Leave it out for every day. One of: mon, tue, wed, thu, fri, sat, sun.
callingHours.timezonestring
An IANA zone, used only for a number whose country cannot be placed. Defaults to your workspace's zone.
ifOutsideHoursstring
Outside the calling hours right now: schedule queues the call for the minute they open; refuse answers 409 with nextOpening and does nothing. Does not apply to a call with scheduledAt, nor to a batch (which always queues). One of: schedule, refuse. Default: schedule.
extractobject[]
The details to fill from the call, keyed back exactly as named. A value that does not fit its type is left out rather than sent wrong. Leave it out for the agent's own collected fields.
extract[].namestringrequired
Letters, digits and underscores, starting with a letter, up to 60 characters. Unique, ignoring case.
extract[].typestring
The value's type. One of: text, number, integer, boolean, date. Default: text.
extract[].descriptionstring
What to put in it, as the model reads it.
extract[].choicesstring[]
Values a text field must be one of. Only for text.
summaryboolean
true writes two or three sentences about the call, false skips it. Leave it out to follow the agent's own switch.
metadataobject
Your own flat data, returned exactly as sent on every report and webhook. Up to 20 keys of 1–60 characters, 4,000 characters serialised; values are strings, numbers, booleans or null — a nested object or list is refused.
scheduledAtstring (date-time)
Don't ring before this instant, written with its offset (2027-03-08T10:00:00+05:30). Up to 30 days ahead; queued, then rung at this time or the next opening of the calling hours after it. A time already past means now.
retryobject
Try again when the person was not reached (no answer, busy, an answering machine, or a pick-up the agent never reached). A declined call, a dead number and a call somebody answered are never retried. A retry keeps the same id, rings only inside the calling hours, and is checked again against opt-outs and the do-not-call list.
retry.countintegerrequired
Further attempts after the first. 0 means none. Range: 0–5.
retry.noAnswerMinutesinteger
Minutes to wait after a call nobody answered, or an answering machine took. Default: 60. Range: 5–1440.
retry.busyMinutesinteger
Minutes to wait after an engaged line. Default: 15. Range: 5–1440.
fromstring
Which of the agent's numbers rings — its own, or one lent to it for calling (List Phone Numbers). Leave it out for the agent's own line. On an agent with several numbers, a chosen number places at most 200 calls a day.
ringSecondsinteger
How long the phone rings before the call is given up, in whole seconds. Leave it out for the agent's voice.ringSeconds (30 unless set). A call nobody answers in that time is reported as no_answer — the hangup of call.completed — and is retried as one when retry asks. Kept for a scheduled call and for each retry. Range: 10–60.
overridesobject
Changes to the agent for this call only; the agent itself is not edited. Any other key is refused by name.
overrides.voicestring
A voice id from List Voices — or, on a workspace that brings its own keys, a voice your own provider offers (List BYOK Voices). A studio voice bills this call at the studio rate.
overrides.languagestring
A language the console offers, e.g. Hindi — what the call is heard and spoken in. auto is not accepted: leave it out for the agent's own behaviour.
overrides.maxCallSecondsinteger
The longest this call may run, in seconds. Range: 60–1200.
overrides.ringSecondsinteger
The same as the top-level ringSeconds; send one or the other. Range: 10–60.
overrides.callInstructionsstring
Replaces the agent's call instructions (the box on its Voice page) for this call.

Example request

bash
curl -X POST "https://app.katexs.com/api/v1/calls" \
  -H "Authorization: Bearer $KATEXS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "+1 415 555 0134",
  "purpose": "I'\''m calling from Skyline Homes about your enquiry for Sky Towers.",
  "agent": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
  "name": "Asha Rao",
  "source": "99acres enquiry form",
  "reference": "LSQ-42",
  "variables": {
    "lead_name": "Asha",
    "project": "Sky Towers",
    "budget_asked": "2BHK"
  },
  "callingHours": {
    "start": "10:00",
    "end": "19:00",
    "days": [
      "mon",
      "tue",
      "wed",
      "thu",
      "fri",
      "sat"
    ]
  },
  "extract": [
    {
      "name": "budget",
      "type": "number",
      "description": "Budget in dollars"
    },
    {
      "name": "interest",
      "choices": [
        "Hot",
        "Warm",
        "Cold"
      ]
    },
    {
      "name": "site_visit",
      "type": "boolean"
    }
  ],
  "summary": true,
  "metadata": {
    "deal_id": "D-19",
    "owner": "Ravi"
  },
  "retry": {
    "count": 2,
    "noAnswerMinutes": 60,
    "busyMinutes": 15
  },
  "from": "918045678901",
  "overrides": {
    "voice": "priya",
    "maxCallSeconds": 300
  }
}'

Responses

StatusDescription
202Accepted: ringing now (out_…), or queued for later (sch_…, with scheduledFor).
400A missing to or purpose, a number that could not be read, a purpose over 300 characters, several phone agents and no agent, a from that is not one of the agent's numbers, a voice that is not offered, or an optional field that breaks its rule. Nothing is created.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
402Your balance cannot pay for a call (code: insufficient_balance). reason says which limit stopped it: no balance, trial spent, overdrawn, too many calls, balance unknown or retry buffer.
403The customer asked not to be contacted (code: opted_out), the number is on your do-not-call list (code: do_not_call), or the key is not a full key (code: key_scope_read or key_scope_build). Branch on code: the three have the same status.
404agent names no agent that answers the phone in this workspace (or voice is not available on this deployment).
409Outside calling hours with ifOutsideHours: "refuse" (carries nextOpening); hours that can never open for this number; a call to this number already waiting on this agent (carries its id and scheduledFor); the person on a call right now (with this agent or another in the workspace); no agent that answers the phone; a number on your own carrier account without its credentials; or the same Idempotency-Key still being processed.
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over 60 calls a minute (code: rate_limit_calls), every line your plan allows already busy (code: concurrent_calls), or a chosen from number has placed its calls for today (code: number_daily_limit). limit names the limit that was hit.
502The phone line refused this call (retrying the same number is unlikely to help), or, on a workspace using its own voice keys, your voice provider could not be reached to check overrides.voice (try again).
503Calling is unavailable right now, or the opt-out lists could not be checked. Worth retrying.

Response fields

idstringrequired
The call's id — out_… when ringing now, sch_… when queued. Every later report and webhook carries it.
tostringrequired
The number as it will be dialled.
fromstring | nullrequired
The number it rings from. Null on a queued call that will use the agent's own line.
statusstringrequired
Ringing now, or queued. One of: ringing, scheduled.
scheduledForstring (date-time)
When a queued call will ring. Only on scheduled.
referencestring | nullrequired
Your reference, echoed.
202 response
{
  "id": "out_9f2c1a44-6b0e-4c1d-8a7f-2e5b3c9d1f60",
  "to": "919876543210",
  "from": "918045678901",
  "status": "ringing",
  "reference": "LSQ-42"
}

Last updated November 2026 · Found a problem? Email support@katexs.com