Place Batch Calls

Calls

Place Batch Calls

Rings up to 200 people with one request. Every option Place Call takes may be set once for the batch and again on an entry, the entry winning (an entry's variables sit on top of the batch's); purpose and agent are the batch's. Every entry is queued and paced inside your plan's lines and balance — none rings inline — and each gets its own sch_… id that reports through call.analysed and Get Call. A bad entry is listed under refused and does not stop the rest. Needs a full key.

POST/calls/batch

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

purposestringrequired
Said aloud first on every call. 300 characters or fewer.
agentstring
Which agent calls — its ag_… id or name. Needed only when more than one agent answers the phone.
callsobject[]required
The people to ring.
calls[].tostringrequired
The person's number, with or without +. A number listed twice is refused the second time.
calls[].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.
calls[].sourcestring
Where the lead came from, e.g. 99acres enquiry form — recorded on a new contact.
calls[].referencestring
Your own id for this lead, never interpreted. It comes back on the response, every report and both call webhooks.
calls[].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.
calls[].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.
calls[].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.
calls[].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.
calls[].summaryboolean
true writes two or three sentences about the call, false skips it. Leave it out to follow the agent's own switch.
calls[].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.
calls[].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.
calls[].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.
calls[].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.
calls[].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.
calls[].overridesobject
Changes to the agent for this call only; the agent itself is not edited. Any other key is refused by name.
idempotencyKeystring
The same as the Idempotency-Key header. One key covers the whole batch.
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/batch" \
  -H "Authorization: Bearer $KATEXS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent": "Skyline Sales",
  "purpose": "I'\''m calling from Skyline Homes about the new tower launching at Baner.",
  "callingHours": {
    "start": "10:00",
    "end": "19:00",
    "days": [
      "mon",
      "tue",
      "wed",
      "thu",
      "fri",
      "sat"
    ]
  },
  "extract": [
    {
      "name": "interest",
      "choices": [
        "Hot",
        "Warm",
        "Cold"
      ]
    }
  ],
  "summary": true,
  "variables": {
    "project": "Sky Towers"
  },
  "retry": {
    "count": 1
  },
  "calls": [
    {
      "to": "919876543210",
      "name": "Asha Rao",
      "reference": "LSQ-42",
      "variables": {
        "lead_name": "Asha"
      }
    },
    {
      "to": "+1 415 555 0134",
      "name": "Vikram Shah",
      "reference": "LSQ-43"
    },
    {
      "to": "12345",
      "reference": "LSQ-44"
    }
  ]
}'

Responses

StatusDescription
202The entries queued and the entries refused.
400No purpose, a purpose over 300 characters, calls missing, empty, over 200 or holding a non-object, or several phone agents and no agent.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
403The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden.
404agent names no agent that answers the phone in this workspace.
409The workspace cannot place calls, no agent answers the phone, or the same Idempotency-Key is still being processed.
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit.

Response fields

acceptedobject[]required
refusedobject[]required
limitintegerrequired
The most entries one request may hold (200).
202 response
{
  "accepted": [
    {
      "id": "sch_2d7b0e91-4f3a-4c88-9b1e-7a6c5d4e3f21",
      "to": "919876543210",
      "reference": "LSQ-42",
      "from": null,
      "status": "scheduled",
      "scheduledFor": "2026-10-06T05:12:44.019Z"
    },
    {
      "id": "sch_7e1f4a20-9c3b-4d5e-8f6a-1b2c3d4e5f60",
      "to": "919920011223",
      "reference": "LSQ-43",
      "from": null,
      "status": "scheduled",
      "scheduledFor": "2026-10-06T05:12:44.019Z"
    }
  ],
  "refused": [
    {
      "to": "12345",
      "reference": "LSQ-44",
      "error": "That number could not be read — too short to be a phone number.",
      "code": "invalid_number"
    }
  ],
  "limit": 200
}

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