aethexDocs

API Reference

Calls API

Place outbound phone calls, log inbound ones, dispatch batches, and inspect status. Reads use calls:read; anything that triggers a dial (single, batch, or log) uses calls:write.

Base URL
https://api.aethexai.com/api/v1
Endpoints
23
Scopes
calls:readcalls:write
GET/calls

Paginated history of every call recorded for the account.

List Calls

Returns every call on your account, newest first. Filter by status, direction, or both. Each call carries the caller's feedback on its conversation (rating and comment, null when none was submitted).

Path & Query

10
  • statusstringoptional

    Filter by call status. One of queued, ringing, in-progress, connected, completed, failed, no-answer, busy, or canceled.

  • directionstringoptional

    Filter by direction. One of inbound or outbound.

  • agent_idstring (UUID)optional

    Only this agent's calls (its id). Paged with cursor, a page costs the same however far back it is, so one agent's history no longer means paging through every other agent's calls.

  • limitintegeroptional

    Maximum number of results to return. Default 50, minimum 1, maximum 1000.

  • offsetintegeroptional

    Number of results to skip from the beginning of the result set. Default 0, minimum 0.

  • cursorstringoptional

    The next_cursor of the previous page: returns the page after it, newest first. A page costs the same however far into your history it is, unlike offset. Use either cursor or offset, not both.

  • created_afterstring (ISO 8601)optional

    Only calls created at or after this time, with its time zone (e.g. 2026-11-01T00:00:00Z).

  • created_beforestring (ISO 8601)optional

    Only calls created before this time, with its time zone.

  • include_totalbooleanoptional

    Default true. Set false to skip counting every matching call: total is then null. Use it when paging through many calls with cursor.

  • metadatastringoptional

    Default full: each call's whole metadata. Set summary to receive only the keys a calls list uses, batch_id, failure_reason and voicemail_result (each only when the call has it), which makes deep lists much cheaper.

Errors

3
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

422Unprocessable Entity

limit is outside [1, 1000] or offset is negative, or direction is not inbound/outbound.

Clamp limit to [1, 1000], set offset >= 0, and use a valid direction value.

POST/calls

Persist a Call row without dialing anyone.

Create Call Record

Creates a Call record without dialing anyone. Useful for logging calls that came in through another system, or pre-staging metadata before something else does the dial. To actually place an outbound call, use POST /calls/trigger.

Request body

5
  • agent_idstring (uuid)required

    The agent associated with the call. It does not need to be dialable; this endpoint only logs the record.

  • directionstringoptional

    Call direction. One of inbound or outbound. Defaults to outbound when omitted, but always send an explicit value; the default may be removed in a future release.

  • to_numberstring (E.164)optional

    E.164 phone number of the callee, e.g. +14155551234. Validated against ^\+[1-9]\d{1,14}$.

  • from_numberstring (E.164)optional

    E.164 phone number of the caller. Example: +14155559876. Validated against the regex ^\+[1-9]\d{1,14}$. This endpoint only logs the record, so from_number is optional here. POST /calls/trigger and per-recipient entries in POST /calls/batch both reject a missing from_number with 422 from_number_required.

  • metadataobjectoptional

    Arbitrary JSON stored on the call for your own bookkeeping (campaign tags, lead IDs, etc.). Returned verbatim on GET /calls/{id}. Defaults to {'}.

Errors

4
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

404Not Found

No agent exists with that ID.

Check the agent ID with GET /agents, or create the agent first.

422Unprocessable Entity

agent_id is empty, direction is not inbound/outbound, or to_number/from_number is not valid E.164 (^\+[1-9]\d{1,14}$).

Send a non-empty agent_id, a valid direction, and E.164 numbers like +14155551234.

POST/calls/trigger

Persist a Call row and dial the recipient asynchronously (returns 202).

Trigger Outbound Call

Triggers an outbound call. Returns 202 Accepted immediately with the queued Call record; the actual dial runs in the background. Poll GET /calls/{id} for terminal status.The from_number must be a phone number registered to your account with outbound enabled (see Phone Numbers). The provider is resolved from that registration automatically. If the dial cannot start, the Call row is marked failed and metadata.error_message carries the reason. A SIP line that paces its calls (calls_per_second_limit on its trunk) holds the call until its turn. If a minute of calls is already waiting, the call is marked failed with metadata.failure_reason sip_pacing_blocked and metadata.retry_after_seconds, the seconds to wait before triggering it again. If Aethex can't run the line's toll-fraud checks at that moment, nothing is dialed: the call is marked failed with metadata.failure_reason sip_guard_unavailable and metadata.retry_after_seconds, the seconds to wait before triggering it again.

Request body

5
  • agent_idstring (uuid)required

    The agent that should handle this call.

  • to_numberstring (E.164)required

    Recipient phone number in E.164 format, e.g. +14155551234. Must match ^\+[1-9]\d{1,14}$.

  • from_numberstring (E.164)required

    Caller ID in E.164 format. Example: +14155559876. Validated against the regex ^\+[1-9]\d{1,14}$. Must be a phone number registered to this account with outbound enabled (see Phone Numbers). Required — omitting it returns 422 from_number_required.

  • dynamic_variablesobjectoptional

    Per-call values for {{ variable_name }} placeholders defined on the agent. Values stored on the agent act as defaults; pass keys here to override them per call and to fill any placeholder that has no default. A placeholder with no value does not refuse the call: the model reads [name: not provided] in its place, and the agent's webhook gets agent.prompt_variables.unfilled (at most once a day). Values must be strings, numbers, or booleans. Keys using the reserved system__ prefix are rejected because supported system placeholders are filled by Aethex.

  • metadataobjectoptional

    Arbitrary JSON stored on the call for your own bookkeeping (campaign tags, lead IDs, etc.). Returned verbatim on GET /calls/{id}. Defaults to {'}.

Errors

14
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

403Capability not available

The agent's voice is on a voice pool your account may not use, or the agent has no voice and no voice your account may use speaks its language. The body's kind and value name it.

Give the agent a voice from GET /voices, which lists only the ones your account may use.

402Payment Required

The account is in a hard-blocked billing state (e.g. canceled grace expired, payment failed past dunning window).

Visit the action_url returned in the error payload to update billing, or contact support. The error body includes code and message describing the exact alert.

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

403Number suppressed

to_number is on your account's do-not-call list (code: number_suppressed). The response says which source suppressed it: an entry you added, the person's own request, or a STOP they texted one of your numbers. No call was created.

Do not retry: nothing about this number changes the answer. Drop it from the list you dial from. If the entry was added in error and is yours to lift, release it with POST /suppressions/{id}/release — entries recording the person's own request cannot be released.

404Not Found

No agent exists with that ID.

Check the agent ID with GET /agents.

422Missing from_number

No from_number was provided in the request body.

Send a from_number that is registered to your account with outbound enabled.

422Unprocessable Entity (from_number not registered)

The resolved from_number is not registered to this account. Error body: invalid_recipients: [{..., reason: "not_registered"}].

Register the number via POST /api/v1/phone-numbers/{provider}/register first, then retry.

422Unprocessable Entity (outbound disabled)

The resolved from_number is registered but has outbound calling disabled. Error body: invalid_recipients: [{..., reason: "outbound_disabled"}].

Enable outbound on the number via PATCH /api/v1/phone-numbers/{id}.

422Unprocessable Entity (validation)

agent_id empty, to_number missing or not E.164, from_number not E.164, or invalid dynamic_variables.

Send a non-empty agent_id, a to_number matching ^\+[1-9]\d{1,14}$, a valid E.164 from_number, and dynamic_variables as a flat object of scalars.

429Too Many Requests

Your account or the shared capacity pool is at its limit. The response includes a Retry-After header.

Honor the Retry-After header and retry. If you hit this consistently, your plan needs more concurrent-call capacity.

503Service temporarily unavailable

We're at capacity right now.

Retry the request after a short back-off. If it persists, contact our team at [email protected].

503Suppression list unreadable

The do-not-call list could not be read (code: suppression_check_unavailable), so the call was refused rather than placed. Transient, and deliberately not a 403: silence from the list is never permission.

Retry after Retry-After seconds. The same request is safe to send again; no call was created.

POST/calls/batch

Enqueue 1–10,000 outbound calls for an agent in one request.

Batch Outbound Calls

Dispatches up to 10,000 outbound calls for an agent and returns a batch_id. Accepts the compatibility shape (call_name, recipient phone_number, agent_phone_number_id, scheduled_time_unix, telephony_call_config, target_concurrency_limit) and the legacy Aethex shape (name, recipient to_number, per-recipient from_number, start_at). The same lifecycle is also available at the compatibility aliases POST /convai/batch-calling/submit, GET /convai/batch-calling/workspace, GET /convai/batch-calling/{batch_id}, POST /convai/batch-calling/{batch_id}/cancel, POST /convai/batch-calling/{batch_id}/retry, and DELETE /convai/batch-calling/{batch_id}. Poll GET /calls/batch/{batch_id} for detailed recipient status.Scheduling. Pass scheduled_time_unix or start_at to defer dispatch. end_at remains a hard deadline for abandoning recipients that have not started.Status vocabulary. Canonical /calls/batch responses use raw Aethex states: scheduled, queued, running, paused, completed, failed, expired, or cancelled. The /convai/batch-calling/* compatibility aliases map those to pending, in_progress, paused, completed, failed, or cancelled and keep the raw state in legacy_status.Transport support. Phone-number recipients are dialed over Twilio and SIP. With whatsapp_params the batch is called on WhatsApp instead: recipients who already allow calls from the number are rung at once, and everyone else is sent the call-permission template and called the moment they tap Allow. A recipient waiting on that reads awaiting_permission, and the batch stays running until the last one has been called, declined, or let the request lapse (24 hours, or end_at).

Request body

13
  • agent_idstring (uuid)required

    The agent that should handle every call in the batch.

  • recipientsobject[]required

    Array of recipient objects. Minimum 1, maximum 10,000. Each entry may use phone_number (compatibility shape) or to_number (legacy), plus optional id, from_number, variables, and conversation_initiation_client_data.dynamic_variables. On a WhatsApp batch, whatsapp_user_id (the person's WhatsApp number, digits) may stand in for phone_number, and from_number does not apply. If agent_phone_number_id is omitted, every phone recipient must provide a tenant-owned outbound-capable from_number. A recipient may also carry transfer_number: where that call transfers to, overriding the agent's own destination for that call alone. One E.164 number, or an array of up to five tried in order when a leg is not answered. Omit it to keep the agent's own setting. Batch recipients are stored durably, so variables cannot include secret__* keys; use POST /calls/trigger for per-call secret dynamic variables.

  • call_namestringoptional

    Compatibility batch label. name is accepted as a legacy alias.

  • namestringoptional

    Optional human-readable batch label, max 255 characters.

  • descriptionstringoptional

    Optional description, max 2000 characters. Omitting it returns as "" in responses.

  • start_atstring (ISO 8601, timezone-aware)optional

    Defer the first dial until this timestamp. Must include a timezone offset. When in the future the batch starts as scheduled; otherwise the field is ignored and the batch starts as queued.

  • end_atstring (ISO 8601, timezone-aware)optional

    Hard deadline. The dialer abandons any recipients still un-started past this timestamp. Must include a timezone offset, must be in the future, and must be strictly after start_at if both are set.

  • scheduled_time_unixintegeroptional

    Unix timestamp for scheduled dispatch. Accepted as an alias for start_at; if both are supplied they must represent the same instant.

  • agent_phone_number_idstring (uuid)optional

    Tenant phone-number UUID to use as the default sender for recipients that omit from_number.

  • whatsapp_paramsobjectoptional

    Call the batch on WhatsApp. whatsapp_phone_number_id names the connected number (its id or Meta's phone-number id; optional when the workspace has one), and whatsapp_call_permission_request_template_name with whatsapp_call_permission_request_template_language_code name an approved template with a call-permission request and no variables — every recipient receives it as written. Each person may appear once, and a recipient given both phone_number and whatsapp_user_id must be the same person. Needs the whatsapp_messages:write scope and counts against the WhatsApp send budget. agent_phone_number_id and from_number do not apply.

  • telephony_call_configobjectoptional

    Optional telephony settings. ringing_timeout_secs controls how long Twilio or SIP rings before giving up; default is 60 seconds.

  • target_concurrency_limitintegeroptional

    Maximum simultaneous calls for this batch. Your account's concurrent-call limits still apply.

  • timezonestringoptional

    Optional IANA timezone label returned with the batch for UI/reporting; scheduling is still driven by absolute timestamps.

Errors

11
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

403Capability not available

The agent's voice is on a voice pool your account may not use, or the agent has no voice and no voice your account may use speaks its language. The body's kind and value name it.

Give the agent a voice from GET /voices, which lists only the ones your account may use.

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

403Missing scope

A WhatsApp batch sends every recipient a call-permission request, and the key lacks whatsapp_messages:write.

Use a key with whatsapp_messages:write: new keys have it. Rotating keeps a key's scopes, so create a new key rather than rotating an older one.

422Calling unavailable from this number

WhatsApp does not let businesses place calls from numbers registered in the United States, Canada, Egypt, Vietnam or Nigeria.

Run the batch from a number registered in another country.

422Calling is off for this number

Meta has calling switched off for the WhatsApp number, or has not switched it on yet (code: whatsapp_calling_off). The batch is refused before anyone is asked.

Turn calling on with POST /whatsapp-accounts/:account_id/calling, then submit the batch again.

404Not Found

No agent exists with that ID.

Check the agent ID with GET /agents.

422Invalid recipients

One or more recipients have a from_number that is missing, not registered, or has outbound disabled. The error body lists each failing row under invalid_recipients[*] with recipient_index, from_number, and reason (not_registered or outbound_disabled).

Fix every offending row before resubmitting. For not_registered, register the number first; for outbound_disabled, enable outbound on it. Partial batches are not accepted.

422Validation error

recipients is empty or longer than 10,000; any to_number is not E.164; name is over 255 chars; description is over 2000 chars; start_at/end_at lack a timezone; end_at is in the past; or end_at <= start_at.

Stick to the field limits listed above and include a timezone on every datetime.

503Service temporarily unavailable

We're at capacity right now.

Retry the request after a short back-off. If it persists, contact our team at [email protected].

GET/calls/batch

List batch calling jobs for the workspace.

List Batch Calls

Returns batch jobs for the current tenant, ordered newest first. Use last_doc with the returned next_doc value for cursor pagination.

Path & Query

3
  • limitintegeroptional

    Page size, 1 to 1000. Defaults to 100.

  • last_docstringoptional

    Cursor returned as next_doc from the previous page.

  • agent_idstring (uuid)optional

    Filter batch jobs to one agent.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

GET/calls/batch/:batch_id

Poll the lifecycle of a batch dispatch.

Get Batch Status

Returns the current state of a batch with per-recipient detail. A recipient on the account's do-not-call list comes back skipped and is counted under skipped rather than failed; a skip is a settled outcome, so a batch of nothing but skips is fully resolved. Skipped recipients send no call.ended — there is no call to report. Canonical /calls/batch responses use raw Aethex states; /convai/batch-calling/* aliases map those states to the compatibility vocabulary and keep the raw value in legacy_status. Each recipient also carries its call: call_id, and call_status, the call's raw status (busy, no-answer, completed…), which the recipient's status folds into fewer values. failure_reason is the reason the call recorded, an open vocabulary that may be null (for example callee_rejected, callee_unavailable, sip_486). A call that failed before reaching the carrier says why, for example no_from_number, number_not_on_tenant, twilio_account_inactive, no_sip_trunk, sip_territory_blocked, tts_not_ready, provider_error (the carrier or our call to it failed) or internal_error. A call the carrier failed says carrier_call_failed. call_created_at is when the call was created, which can be minutes before it rang, then call_answered_at and call_ended_at; take talk time from duration_seconds, not from call_ended_at minus call_created_at. attempt_count counts dial attempts to the recipient in this batch, retries included, and a dial that failed before reaching the carrier too. While a retry waits these describe the last call placed; a recipient never dialed has null call fields and an attempt_count of 0.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

4
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

404Not Found

No batch with this ID exists.

Confirm the batch_id returned from POST /calls/batch.

422Unprocessable Entity

batch_id is not a valid UUID.

Pass the UUID returned by POST /calls/batch.

POST/calls/batch/:batch_id/cancel

Stop future dispatch for a batch and mark recipients cancelled.

Cancel Batch Calls

Cancels the batch control plane and prevents remaining recipients from being dispatched. Calls already handed to a carrier are not forcibly dropped by this endpoint.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

POST/calls/batch/:batch_id/retry

Retry failed and no-answer recipients.

Retry Batch Calls

Resets failed, busy, no-answer, cancelled-provider, and deferred recipients to pending and enqueues the batch again. Successful recipients are not duplicated. Recipients skipped for the do-not-call list are never resurrected: nothing about those numbers will be different on a later pass.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

5
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

403Capability not available

The agent's voice is on a voice pool your account may not use, or the agent has no voice and no voice your account may use speaks its language. The body's kind and value name it.

Give the agent a voice from GET /voices, which lists only the ones your account may use.

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

409Batch is paused

Retry would overwrite the pause and start a new pass over a batch that is waiting to be resumed.

Call POST /calls/batch/:batch_id/resume to continue the batch. Retry once it has finished.

POST/calls/batch/:batch_id/pause

Hold a batch's remaining recipients until you resume it.

Pause Batch Calls

Stops dialing a scheduled, queued or running batch and sets its status to paused. Recipients not yet called are held and read pending. A call already being placed at that moment still goes out, and calls already ringing or in progress finish normally and are counted as usual. Pausing a paused batch changes nothing and returns it. A finished or cancelled batch cannot be paused.On a WhatsApp batch, permission requests already sent stay open. Someone who taps Allow while the batch is paused is called once it resumes.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

4
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

404Not Found

No batch with this ID exists.

Confirm the batch_id returned from POST /calls/batch.

422Batch is finished

The batch is completed, failed, expired or cancelled; there is nothing left to hold.

Check the batch status with GET /calls/batch/:batch_id.

POST/calls/batch/:batch_id/resume

Continue a paused batch with the recipients it held.

Resume Batch Calls

Continues a paused batch: the same batch, with the same recipients and counters. Every held recipient is called once; recipients already called are not called again. If start_at is still ahead, the batch goes back to scheduled and starts then; otherwise it is queued and dialing starts now. Send end_at to renew the calling window, as on retry; without it the batch keeps its own. A paused batch stays paused past its end_at until it is resumed with a new end_at or cancelled, and on a phone batch every held recipient waits with it. Resuming a scheduled, queued or running batch changes nothing and returns it; end_at is ignored then, though a malformed one, or one without a timezone offset, is still refused with a validation error.On a WhatsApp batch, nobody is sent a second permission request. Recipients who tapped Allow while it was paused are called if WhatsApp still holds their permission, and are marked failed otherwise. A request that lapses during the pause fails, as it would without one. If the batch's end_at passes during the pause, a request still waiting for an answer is withdrawn and its recipient marked failed, as without a pause: resuming does not call them, and POST /calls/batch/:batch_id/retry asks them again once the resumed batch has finished.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Request body

1
  • end_atstring (ISO 8601, timezone-aware)optional

    Optional. A new deadline for the batch, as on retry: the dialer abandons any recipients still un-started past it. Without it the batch keeps its own end_at, which must not have passed. Must include a timezone offset, must be in the future, and must be strictly after start_at if both are set.

Errors

14
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

403Capability not available

The agent's voice is on a voice pool your account may not use, or the agent has no voice and no voice your account may use speaks its language. The body's kind and value name it.

Give the agent a voice from GET /voices, which lists only the ones your account may use.

402Payment Required

The account is in a hard-blocked billing state (e.g. canceled grace expired, payment failed past dunning window).

Visit the action_url returned in the error payload to update billing, or contact support. The error body includes code and message describing the exact alert.

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

403Missing scope

A WhatsApp batch sends every recipient a call-permission request, and the key lacks whatsapp_messages:write.

Use a key with whatsapp_messages:write: new keys have it. Rotating keeps a key's scopes, so create a new key rather than rotating an older one.

404Not Found

No batch with this ID exists.

Confirm the batch_id returned from POST /calls/batch.

404Agent not found

The batch's agent was deleted while the batch was paused. Nothing is dialed and the batch stays paused.

Cancel the batch, and create a new one with an existing agent.

409Agent not ready

The batch's agent is still being provisioned, failed provisioning, or was revoked since the batch was paused. Nothing is dialed and the batch stays paused.

Resume once the agent is ready again, or cancel the batch.

409Paused meanwhile

The batch was not paused when the request arrived and was paused before the resume took effect, so the checks a resume needs did not run. Nothing changed: the batch is paused.

Resume it again.

422Batch is finished

The batch is completed, failed, expired or cancelled, so there is nothing to resume.

A completed, failed or expired batch can be retried instead: POST /calls/batch/:batch_id/retry calls its failed recipients again. A cancelled batch can be neither resumed nor retried.

422Calling window closed

The batch's end_at passed while it was paused and no new end_at was sent, or the end_at sent is in the past or is not after start_at. Nothing changed: the batch is still paused.

Resume it again with an end_at in the future, after start_at, with a timezone offset. Or cancel it.

429Too many WhatsApp sends

Resuming a WhatsApp batch sends a call-permission request to every held recipient not asked yet, and the account's WhatsApp send budget is spent for now. The response includes a Retry-After header.

Honor the Retry-After header and resume again. The batch stays paused meanwhile.

503Service temporarily unavailable

The batch could not be handed back to the dialer, and was put back to paused with the recipients it held. Or, on a WhatsApp batch, the send limiter is offline, and nothing changed.

Check the batch's status, then resume it again, after the Retry-After delay when the response has one.

DELETE/calls/batch/:batch_id

Delete the batch and recipient records.

Delete Batch Calls

Deletes the batch resource and its recipient attempt records. Conversation and call history remain available through the calls and conversations APIs.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

POST/convai/batch-calling/submit

The same call as `POST /calls/batch`, under the common batch-calling name.

Submit a batch (compatibility alias)

An alias for POST /calls/batch, so a client written against the familiar submit/workspace/cancel/retry names works unchanged. Same body, same implementation, one difference in the response: status is reported as pending, in_progress, completed, failed or cancelled, and the raw internal value moves to legacy_status. See POST /calls/batch above for the full body.

Errors

3
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

GET/convai/batch-calling/workspace

The same list as `GET /calls/batch`, under the workspace name.

List batches (compatibility alias)

An alias for GET /calls/batch. Each row carries the mapped status alongside the raw legacy_status; everything else matches the canonical list.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

GET/convai/batch-calling/:batch_id

The same record as `GET /calls/batch/{batch_id}`.

Get a batch (compatibility alias)

An alias for GET /calls/batch/{batch_id}, with status mapped to the pending/in_progress vocabulary and the raw value in legacy_status.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

POST/convai/batch-calling/:batch_id/cancel

The same call as `POST /calls/batch/{batch_id}/cancel`.

Cancel a batch (compatibility alias)

An alias for POST /calls/batch/{batch_id}/cancel. Stops dialling the recipients that have not started; calls already in progress run to their end.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

POST/convai/batch-calling/:batch_id/retry

The same call as `POST /calls/batch/{batch_id}/retry`.

Retry a batch (compatibility alias)

An alias for POST /calls/batch/{batch_id}/retry. Re-dials the recipients that failed, leaving the ones that connected alone.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

3
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

403Language not available

The agent speaks a local African language or Arabic, or a local dialect (dialect_style mixed or local), or a recipient's override names one: those are part of the Aethex enterprise platform. The agent reads language_available: false.

Use english or french in its standard form, or move the work to the Aethex enterprise platform.

DELETE/convai/batch-calling/:batch_id

The same call as `DELETE /calls/batch/{batch_id}`.

Delete a batch (compatibility alias)

An alias for DELETE /calls/batch/{batch_id}. Returns 204 with no body.

Path & Query

1
  • batch_idstring (uuid)required

    UUID of the batch returned from POST /calls/batch.

Errors

2
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

GET/calls/:call_id

Fetch a single Call row by ID.

Get Call

Returns the full record for a single call. Failed dials carry a metadata.error_message explaining what went wrong. The provider field reflects how the call was placed: twilio, sip, aethex-sip, webrtc (for in-browser sessions), or websocket (for a call streamed over the WebSocket API). feedback is the caller's rating and comment on the call's conversation, null when none was submitted.

Path & Query

1
  • call_idstring (uuid)required

    UUID of the call.

Errors

4
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

404Not Found

No call with this ID exists.

Confirm the call_id from POST /calls/trigger or GET /calls.

422Unprocessable Entity

call_id is not a valid UUID.

Pass the call ID from POST /calls/trigger or GET /calls.

GET/calls/:call_id/status

Lightweight telephony-status read for polling.

Get Call Status

A lightweight version of Get Call that returns only the status, provider, and elapsed duration. Use this for tight polling loops where you do not need the full record.

Path & Query

1
  • call_idstring (uuid)required

    UUID of the call.

Errors

4
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

404Not Found

No call with this ID exists.

Confirm the call_id from POST /calls/trigger or GET /calls.

422Unprocessable Entity

call_id is not a valid UUID.

Pass the call ID from POST /calls/trigger or GET /calls.

GET/transfer-queues

Who is holding for a person after a transfer, right now.

List Transfer Queues

A live view of the callers your agents tried to transfer, holding because nobody on the route answered, grouped by agent and transfer route: on hold until someone in your team puts them through (waiting), or being put through right now (ringing, with the number being rung). position is a caller's place in line (1 has held the longest), held_seconds how long they have held, and numbers the route's handoff numbers they can be put through to. A caller appears when nobody answered the transfer's round of rings and leaves when someone takes the call, when they hang up, or when the wait runs out and the agent offers them a callback. Only agents with a transfer queue (transfer_queue_max_wait_seconds) appear. Every call also keeps how long its caller held, as transfer_wait_seconds. dialing lists the calls whose transfer is ringing a number right now, with the number: the route's numbers one after another before anyone holds, and a put-through. It covers SIP warm and conference transfers on every agent, with or without a queue; Twilio and blind (REFER) transfers never appear in it.

Path & Query

1
  • agent_idstring (uuid)optional

    Only this agent's routes.

Errors

3
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:read scope.

Use an API key that has calls:read.

503Transfer queue unavailable

The live queue could not be read.

Retry shortly. Calls are not affected: transfers keep running, and each call still records how long its caller held.

POST/transfer-queues/:call_id/put-through

Ring one of a holding caller's handoff numbers now, and connect them.

Put a Holding Caller Through

Puts a caller who is holding in a transfer queue through to a person: the number you pass rings within a second, and the person hears the agent's summary of the call, then the caller. Use it when someone in your team is ready to take the call; nobody is rung on their own while a caller holds. phone_number must be one of the caller's handoff numbers (numbers in GET /transfer-queues). If nobody answers, the caller holds again and can be put through again.

Path & Query

2
  • call_idstringrequired

    The holding caller's call id, as in GET /transfer-queues.

  • phone_numberstringrequired

    One of the caller's handoff numbers, in E.164.

Errors

6
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

404Caller not holding

The call is not in the transfer queue: it was put through already, the caller hung up, or the wait ran out.

Refresh GET /transfer-queues; only callers listed there can be put through.

409Already being put through

A put-through for this caller is ringing.

Wait for it to end. If nobody answers, the caller holds again and can be put through again.

422Not a handoff number

phone_number is not one of the numbers on the route the caller was transferred on.

Use one of the caller's numbers from GET /transfer-queues, or add the number to the agent's transfer route.

503Transfer queue unavailable

The live queue could not be read.

Retry shortly. Calls are not affected: transfers keep running, and each call still records how long its caller held.

POST/calls/:call_id/end

Hang up a live call now, on any carrier.

End a Call

Hangs up a live call immediately, even mid-sentence, whichever carrier it is on: Twilio, SIP, Microsoft Teams, WhatsApp, a browser session or a WebSocket call, whose client is told the call ended. status in the response says what happened. ending means the carrier was asked to hang up; the call then reaches its final status through the carrier's usual callback, usually within seconds. If the call had already ended, the response carries its final status (completed, failed, busy, no-answer or canceled), or ended when the carrier reports the call over before that final status is recorded. Only ending means this request ended the call. Safe to repeat.

Path & Query

1
  • call_idstring (uuid)required

    UUID of the call to hang up.

Errors

7
401Unauthorized

Missing or invalid API key.

Send a valid live key in X-API-Key or Authorization: Bearer ....

403Forbidden

API key does not have the calls:write scope.

Use an API key that has calls:write.

404Not Found

No call with this ID exists for your account.

Confirm the call_id from POST /calls/trigger or GET /calls.

409Conflict

The call has no carrier leg or live session to end yet, for example a batch call still waiting to be dialed, or its provider cannot be ended this way.

For a batch call that has not been dialed, cancel its batch instead. Otherwise retry once the call has connected.

422Unprocessable Entity

call_id is not a valid UUID.

Pass the call ID from POST /calls/trigger or GET /calls.

502Bad Gateway

The carrier did not accept the hang-up or could not be reached. The call may still be live.

Retry the request.

503Service Unavailable

The carrier credentials stored for this call cannot be used right now.

Retry later. Contact support if it keeps happening.

POST/calls/:call_id/notes

Tell the caller how a task they are waiting on is going.

Post a Call Note

While a call is live, your backend can report on a long task the caller is waiting for. The agent relays each note to the caller in its own words at the next moment it would not talk over anyone: never while the caller is speaking or has asked to finish their thought, and never during a transfer or a goodbye. The note reaches the agent as an update from your system, never as something the caller said, and the agent is told not to follow instructions it contains.Authentication. Send the X-Aethex-Note-Token header. Aethex adds a fresh note token to every request a custom tool makes during a WebRTC call as the X-Aethex-Note-Token header. It is valid only for that call, until the call ends, and can be handed to whatever runs the task. An API key is not needed, and on its own is not enough: without a valid note token the request is refused with 401.Delivery. A progress note that has not been read yet is replaced by the next note, so the caller hears where the task is now. result notes are never dropped and are read in order; there is no limit on how many a call receives. Notes arriving together are read in one reply.Spoken as written. A say note is spoken word for word, without the model rewording it, and enters the conversation as the agent's own words. To stream an answer, post it one sentence at a time as say notes, each after the previous one's 202: a sentence that arrives while the agent is still saying the one before follows it without a pause, and otherwise waits for a moment when nobody is talking. say notes are never replaced, are spoken in order, and count toward the 50 waiting to be read. Your text reaches the caller unedited, so it must be ready to say aloud. The agent also knows your text was the answer, for the caller's follow-up questions. If the caller cuts the agent off while it is saying them, or speaks between them, the rest of that answer is not spoken: the notes still waiting are dropped, and say notes sent later with the same note token are answered 202 with status dropped, the sign to stop sending that answer.A note accepted (202) but not yet read when the call ends is dropped.Waiting on a task. The agent does not ask a caller who waits on your work whether they are still there, and does not leave them in silence either: while the task runs, a caller who has not heard the agent for about 15 seconds is told, in a short line, that it is still on it. A task runs, for the tool call whose note token it reports with, until its result note or first say note, from the first of: your tool endpoint answering 202 Accepted; the tool's result saying the work goes on and its outcome will follow during the call (the agent reads the result's words, so "a note will bring you the result" counts, while "the answer will come with your next request" does not); or its first progress note. A task holds this for as long as it has been heard from (its answer or its latest note) in the last 5 minutes. Without a running task, there are no check-ins while a note waits to be read, nor for 20 seconds after a note arrived or was read, or after a tool request that carried a note token returned. After that, the usual check-ins and goodbye resume, and the call's maximum duration always applies.Limits. Up to 50 results can wait to be read on one call, and each call accepts about one note per second, in bursts of 10. Past either limit the note is refused with 429 and a Retry-After header: retry it, it was not queued.Notes work on WebRTC calls (browser sessions, and WhatsApp calls) for now.

Path & Query

1
  • call_idstring (uuid)required

    UUID of the call, the call_id your custom tool received.

Request body

3
  • textstringrequired

    What to tell the caller, as plain text, 1 to 1000 characters. Line breaks, tabs and other control characters become spaces, and invisible formatting characters are removed.

  • kind'progress' | 'result' | 'say'required

    progress while the task runs, result for what came of it, say for words spoken exactly as written. A progress note says the task is still running, and its result or first say ends it.

  • status'in_progress' | 'done' | 'failed'optional

    Optional. Where the task stands: in_progress with a progress note, done or failed with a result, none with say. Any other pair is refused with 422.

Errors

8
401Unauthorized

The X-Aethex-Note-Token header is missing, malformed or expired.

Send the note token from a custom tool request made during this call.

403Forbidden

The note token was issued for another call.

Use the token that came with the tool request of this call.

404Not Found

No call with this ID exists.

Use the call_id your custom tool received.

409Conflict

Notes are not supported for this call type (for now, only WebRTC calls, WhatsApp included, take notes), or the call has no live session.

Do not retry this note.

410Gone

The call has ended, or its goodbye is under way.

Stop posting notes for this call.

422Unprocessable Entity

The body has an unknown field, a value of the wrong type, an unknown kind or status, a status that does not fit the kind, or text is empty or longer than 1000 characters.

Send exactly text, kind and, optionally, status.

429Too Many Requests

Too many results are waiting to be read on this call, or notes are arriving faster than the call accepts them.

Retry after the number of seconds in Retry-After.

502Bad Gateway

The server running the call could not be reached. It may have restarted.

Retry once; a call that has ended answers 410.