Skip to content
RelationsAI
Try it uses test keys only. Requests go straight from your browser to https://voice-api.relationsai.com/v1 with a rai_test_ key, which never places a real call. It works once the API is enabled for your workspace (private preview: support@relationsai.com). Your key stays in this tab's memory; live keys are refused.
RelationsAI API

Agent

An AI voice agent: what callers hear and how the conversation goes. Agents are created, configured, published and switched on in the console. A call uses the agent's published version.
id
​string · pattern: ^agent_[A-Za-z0-9_-]… · required

Agent id (agent_...).

object
​string · const · required

Always agent.

Const value: agent
livemode
​boolean · required

Mode of the key that read it. Agents are shared configuration, readable in both modes.

name
​string · required

Agent name.

description
​string | null · required

What the agent is for, as written in the console. Null when not set.

status
​string · enum · required

Whether the agent is switched on in the console. active agents can place calls; paused and draft agents cannot. Open enum: unknown values mean the agent cannot be assumed callable.

Enum values:
active
paused
draft
unknown
published
​boolean | null · required

True when the agent has a published version that calls use. Null when the publication state could not be read right now; use the readiness endpoint for a definite answer.

published_version
​integer | null · min: 1 · required

Number of the published version, when known.

is_default
​boolean · required

True for the workspace's default agent.

sample
​boolean · required

True only for the built-in Sample agent that exists in test mode.

created_at
​string · date-time · required

When the agent was created.

updated_at
​string | null · date-time · required

When the agent's configuration last changed, when known.

AgentList

A page of agents, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​Agent[] · required

Agents on this page.

AgentReadiness

Whether an agent can place calls right now, and every reason it cannot. This is a point-in-time check of the agent and the workspace. Per-destination rules (do-not-call list, consent, calling hours, the per-number daily limit) are checked when each call is placed and are not part of readiness.
object
​string · const · required

Always agent_readiness.

Const value: agent_readiness
livemode
​boolean · required

Mode of the key that asked.

agent_id
​string · required

The agent checked.

ready
​boolean · required

True when reasons is empty.

​AgentReadinessReason[] · required

Every reason the agent cannot place calls. Empty when ready.

checked_at
​string · date-time · required

When the check ran.

AgentReadinessReason

One reason an agent cannot place calls.
code
​string · required

Machine-readable reason. Open enum: agent_paused (switched off in the console), agent_not_connected (setup not finished: open the agent in the console and save it once), agent_not_published (no published version, or its live version is paused), no_outbound_number (no outbound number assigned to the agent), calling_not_configured (no telephony account or number in the workspace), telephony_disconnected, account_inactive (trial ended or account suspended), spend_limit_reached, insufficient_balance.

message
​string · required

What to do about it, for an operator.

ArtifactState

State of one call artifact.
state
​string · enum · required

pending, ready, absent or failed. Open enum.

Enum values:
pending
ready
absent
failed

Call

An outbound call placed by an agent. A call moves through these statuses: `queued` (accepted; being placed) -> `ringing` (not reported today, see `capabilities.call_ringing_status` on the workspace) -> `in_progress` (connected) -> `ended`. After `ended`, the transcript, recording and analysis become ready (`artifacts`), and the charge is finalised. When everything is final, `settled` becomes true and a `call.settled` event is sent. `outcome`, `duration_seconds` and `cost` can still change between `ended` and `settled`; treat them as final only once `settled` is true.
id
​string · pattern: ^call_[A-Za-z0-9_-]{… · required

Call id (call_...).

object
​string · const · required

Always call.

Const value: call
livemode
​boolean · required

true for a live call, false for a simulated test-mode call.

status
​string · enum · required

Where the call is in its lifecycle. Open enum. unknown means the state could not be confirmed for an unusually long time; it is not a success.

Enum values:
queued
ringing
in_progress
ended
unknown
outcome
​string | null · enum · required

How the call ended. Null until status is ended. completed: answered and a conversation took place. no_response: answered but nobody spoke (this includes most voicemail greetings). no_answer, busy: not answered. failed: could not be connected. unknown: the result could not be determined. Open enum.

Enum values:
completed
no_response
no_answer
busy
failed
unknown
end_reason
​string | null · enum · required

Why the call ended. Null until status is ended. hangup: a normal end of a connected call. no_answer, busy, invalid_number, network_error: the call was not connected for that reason. insufficient_balance: ended because the workspace balance ran out. not_confirmed: the start was never confirmed, so the call is treated as failed and is not charged (whether the number briefly rang cannot be known). refused: the call was refused before it started. unknown. Open enum.

Enum values:
hangup
no_answer
busy
invalid_number
network_error
insufficient_balance
not_confirmed
refused
direction
​string · enum · required

Always outbound today. Open enum.

Enum values:
outbound
inbound
source
​string · enum · required

api (placed with POST /v1/calls), console, or campaign. Open enum.

Enum values:
api
console
campaign
agent_id
​string | null · required

The agent that handled the call. Null only if the agent was deleted.

campaign_id
​string | null · required

The campaign that placed the call, if any.

phone_number_id
​string | null · required

The workspace number the call was placed from, once known.

from
​string | null · required

The caller number shown to the person called (E.164), once known. Null when not known in full.

to
​string | null · required

The number called (E.164), always in full. Null only for some calls recorded before 2026-08-14 whose number was stored partially at the time; a partial number is never shown in place of a full one.

​Metadata · maxProps: 16 · required

Your own key-value data, stored with the object and returned as sent. Up to 16 keys; keys up to 40 characters (letters, digits, _, -, .), values strings up to 500 characters. Never sent to the person called and never used by the agent. Do not put secrets here.

created_at
​string · date-time · required

When the call was accepted.

ended_at
​string | null · date-time · required

When the call ended.

duration_seconds
​integer | null · min: 0 · required

Talk time in seconds once known. Final when settled is true.

billable_minutes
​integer | null · min: 0 · required

Minutes charged (whole minutes, rounded up). Zero for calls that are not charged. Final when settled is true.

​required

What the workspace was charged for this call. Null until known; always zero in test mode.

​CallArtifacts · required

Readiness of each artifact of the call. pending: not ready yet. ready: available from its endpoint. absent: there is none for this call (for example a call that was not answered has no recording). failed: it could not be produced. Open enum.

settled
​boolean · required

True when outcome, duration, artifacts and charge are all final.

settled_at
​string | null · date-time · required

When the call settled.

CallAnalysis

What the call achieved: a summary, the fields the agent was configured to extract, and whether the call's goal was met. Produced after the call ends.
object
​string · const · required

Always call_analysis.

Const value: call_analysis
livemode
​boolean · required

Mode of the call.

call_id
​string · required

The call.

state
​string · enum · required

Overall state: pending while any part is still being produced, ready when every part has finished (a part may still be failed), absent when the call produced nothing to analyse. Open enum.

Enum values:
pending
ready
absent
failed
simulated
​boolean · required

True for a test-mode fixture.

​object · required

A short written summary of the conversation.

​ExtractedField[] · required

Fields the agent is configured (in the console) to extract from the conversation.

goal_met
​boolean | null · required

Whether the call met the agent's goal, when the agent is configured to report it. Null otherwise.

CallArtifacts

Readiness of each artifact of the call. `pending`: not ready yet. `ready`: available from its endpoint. `absent`: there is none for this call (for example a call that was not answered has no recording). `failed`: it could not be produced. Open enum.
​ArtifactState · required

State of one call artifact.

​ArtifactState · required

State of one call artifact.

​ArtifactState · required

State of one call artifact.

CallCreateRequest

Place one outbound call.
agent_id
​string · pattern: ^agent_[A-Za-z0-9_-]… · required

The agent that makes the call (agent_...). It must be ready (see the agent readiness endpoint).

to
​string · e164 · pattern: ^\+[1-9][0-9]{7,14}$ · required

The number to call, in E.164 format (a plus, then 8 to 15 digits, the first not 0).

phone_number_id
​string · pattern: ^pn_[A-Za-z0-9_-]{1,…

The workspace number to call from (pn_...). Optional: by default the agent's outbound number is used. Required when the agent has more than one outbound number.

​object · maxProps: 50

Values the agent can use in the conversation, for example {"first_name": "Asha"}. Up to 50 keys; keys are lowercase letters, digits and _, starting with a letter, up to 64 characters; values are strings up to 500 characters. If the destination matches a contact, the contact's name and custom fields are added automatically; values here take precedence.

​Metadata · maxProps: 16

Your own key-value data, stored with the object and returned as sent. Up to 16 keys; keys up to 40 characters (letters, digits, _, -, .), values strings up to 500 characters. Never sent to the person called and never used by the agent. Do not put secrets here.

CallEvent

A call event. `data.object` is the call as it was when the event was created.
id
​string · pattern: ^evt_[A-Za-z0-9_-]{1… · required

Event id (evt_...). The same event can be delivered more than once; use this to discard duplicates.

object
​string · const · required

Always event.

Const value: event
type
​WebhookEventType · enum · required

The call event type.

Enum values:
call.ended
call.settled
created_at
​string · date-time · required

When the event happened.

livemode
​boolean · required

Mode of the event.

api_version
​string · required

Version of the payload format, a date. Today 2026-10-21.

​object · required

Event data.

CallList

A page of calls, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​Call[] · required

Calls on this page.

CallRecording

The call recording. When `state` is `ready`, `url` is a short-lived HTTPS link to the audio that needs no API key. Fetch it before `expires_at`, and retrieve this object again for a fresh link. Do not store the link.
object
​string · const · required

Always call_recording.

Const value: call_recording
livemode
​boolean · required

Mode of the call.

call_id
​string · required

The call.

state
​string · enum · required

pending, ready, absent (no recording exists for this call) or failed. Open enum.

Enum values:
pending
ready
absent
failed
simulated
​boolean · required

True for the short synthetic audio file used in test mode.

url
​string | null · uri · required

Short-lived link to the audio. Null unless state is ready.

expires_at
​string | null · date-time · required

When url stops working.

content_type
​string | null · required

Media type of the audio, for example audio/ogg or audio/mpeg (audio/wav for test-mode audio). Null when not known in advance; the download's Content-Type is authoritative.

CallTranscript

The words spoken on a call, in order, verbatim (nothing is masked). Available after the call ends; `state` says whether it is ready.
object
​string · const · required

Always call_transcript.

Const value: call_transcript
livemode
​boolean · required

Mode of the call.

call_id
​string · required

The call.

state
​string · enum · required

pending, ready, absent (nothing was said or the call was not connected) or failed. turns is empty unless ready. Open enum.

Enum values:
pending
ready
absent
failed
simulated
​boolean · required

True for a test-mode fixture transcript.

​TranscriptTurn[] · required

Turns in the order they were spoken.

Campaign

A campaign calls a list of recipients (contacts) with one agent. Lifecycle: `draft` -> start -> `running` <-> `paused` -> `stopped`, or `running` -> `completed` / `failed`. - **start** begins a run. It is allowed from `draft`, `paused`, `stopped`, `completed` and `failed`. From `paused` it abandons the paused run and begins a new one; from `stopped`, `completed` or `failed` it calls the previous run's recipients again, including people already reached. A start of a campaign that was stopped before it ever started calls the recipients added to it. Every start screens recipients against the do-not-call list, consent and the per-number daily limit and leaves blocked ones out. - **pause** (from `running`) stops new calls; calls already connected finish normally. - **resume** (from `paused`) continues the same run. Every remaining recipient is screened again; if any is now blocked, the resume is refused and the campaign stays paused. - **Do-not-call timing.** Recipients are screened when a run starts and when it resumes, not before each call. A number added to the do-not-call list while the campaign is running is still called by that run: pause and resume the campaign (the resume is refused while a remaining recipient is listed) or stop it. - **stop** (from `draft`, `running` or `paused`) ends the campaign; calls already connected finish. - **Edits** (PATCH) are allowed in every status except `running` and take effect at the next start. A resume continues with the settings the run began with. - **Recipients** can be added only while the campaign is `draft`. A campaign whose do-not-call screening was switched off in the console (`dnc_screening` `disabled_in_console`) cannot be started or resumed through the API. A campaign can also be paused automatically, for example when its budget cap is reached, the workspace balance runs out, or the telephony connection drops. `capabilities` says which actions are allowed right now.
id
​string · pattern: ^cmp_[A-Za-z0-9_-]{1… · required

Campaign id (cmp_...).

object
​string · const · required

Always campaign.

Const value: campaign
livemode
​boolean · required

true for a live campaign, false for a test-mode campaign.

name
​string · required

Campaign name.

agent_id
​string | null · required

The agent that makes the calls. Null if the agent was deleted; the campaign cannot start until one is set.

status
​string · enum · required

draft (never started), running, paused, stopped, completed (the run finished), failed (the run ended in failure), unknown. Open enum.

Enum values:
draft
running
paused
stopped
completed
failed
unknown
​CampaignCapabilities · required

Which actions the campaign allows in its current status.

concurrency_limit
​integer · min: 1 · required

Most calls the campaign places at the same time. Lowered at start to the plan maximum (limits.campaign_max_concurrency on the workspace). Campaigns created in the console can hold a higher value than the API accepts on a write.

​required

The spend at which the campaign is paused. When the campaign's spend reaches the cap the campaign is paused. The check runs about every 15 minutes, so spend can exceed the cap by the calls placed in that time. Null for no cap.

recipient_count
​integer · min: 0 · required

Before the first start, the recipients added to the campaign. From a start on, the recipients that run calls: recipients left out by compliance screening at that start are not counted.

​CampaignProgress · required

Call counts for the current or latest run. A call is counted in in_progress until it ends, and only then in connected, no_answer or failed. Updated as calls end; can lag by up to a minute.

​object · required

What the current or latest run has cost so far. Always zero in test mode, which never charges.

run_number
​integer · min: 0 · required

How many runs the campaign has had. 0 before the first start.

created_at
​string · date-time · required

When the campaign was created.

dnc_screening
​string · enum

enforced (numbers on the do-not-call list are left out at every start and block a resume) or disabled_in_console (a person switched screening off for this campaign in the console; the API refuses to start or resume it with 409 campaign_dnc_override_enabled). Read-only. Open enum.

Enum values:
enforced
disabled_in_console

CampaignCapabilities

Which actions the campaign allows in its current status.
start
​boolean · required

POST .../start is allowed.

pause
​boolean · required

POST .../pause is allowed.

resume
​boolean · required

POST .../resume is allowed.

stop
​boolean · required

POST .../stop is allowed.

update
​boolean · required

PATCH is allowed.

add_recipients
​boolean · required

POST .../recipients is allowed.

CampaignCreateRequest

Create a campaign in `draft` status. Nothing is dialled until you start it.
name
​string · minLength: 1 · maxLength: 200 · required

Campaign name.

agent_id
​string · pattern: ^agent_[A-Za-z0-9_-]… · required

The agent that makes the calls.

concurrency_limit
​integer · min: 1 · max: 100

Most simultaneous calls. Defaults to 1. Lowered at start to the plan maximum.

Default: 1
​

The spend at which the campaign is paused. When the campaign's spend reaches the cap the campaign is paused. The check runs about every 15 minutes, so spend can exceed the cap by the calls placed in that time. Omit or null for no cap.

contact_ids
​string[] · maxItems: 1000 · unique

Contacts to add as recipients now. You can also add them later, while the campaign is draft.

CampaignEvent

A campaign event. `data.object` is the campaign as it was when the event was created.
id
​string · pattern: ^evt_[A-Za-z0-9_-]{1… · required

Event id (evt_...). The same event can be delivered more than once; use this to discard duplicates.

object
​string · const · required

Always event.

Const value: event
type
​WebhookEventType · enum · required

The campaign event type.

Enum values:
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
created_at
​string · date-time · required

When the event happened.

livemode
​boolean · required

Mode of the event.

api_version
​string · required

Version of the payload format, a date. Today 2026-10-21.

​object · required

Event data.

CampaignList

A page of campaigns, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​Campaign[] · required

Campaigns on this page.

CampaignProgress

Call counts for the current or latest run. A call is counted in `in_progress` until it ends, and only then in `connected`, `no_answer` or `failed`. Updated as calls end; can lag by up to a minute.
calls
​integer · min: 0 · required

Calls placed.

connected
​integer · min: 0 · required

Ended calls that were answered.

no_answer
​integer · min: 0 · required

Ended calls that were not answered or were busy.

failed
​integer · min: 0 · required

Every other ended call (it could not be connected, or it ended with an outcome that is not known).

in_progress
​integer · min: 0 · required

Calls not yet ended.

CampaignRecipient

One recipient of a campaign and what has happened to them in the current or latest run.
id
​string · pattern: ^rcp_[A-Za-z0-9_-]{1… · required

Recipient id (rcp_...).

object
​string · const · required

Always campaign_recipient.

Const value: campaign_recipient
livemode
​boolean · required

Mode of the campaign.

campaign_id
​string · required

The campaign.

contact_id
​string · required

The contact.

phone_number
​string · required

The number that is (or was) called.

status
​string · enum · required

pending (not yet called in this run), in_progress, completed (called; see outcome), failed (every attempt failed), suppressed (left out by compliance screening, see suppression_reason), cancelled (the run stopped before reaching them), unknown. Open enum. In live mode a recipient left out by screening at start is not recorded per recipient yet: it shows pending while the run is open and unknown once the run has ended. Test mode records it as suppressed.

Enum values:
pending
in_progress
completed
failed
suppressed
cancelled
unknown
attempts
​integer · min: 0 · required

Call attempts made in this run.

last_call_id
​string | null · required

The most recent call to this recipient, if any.

outcome
​string | null · required

Outcome of the most recent call, using the call outcome values. Null if not called yet.

suppression_reason
​string | null · required

Why the recipient was left out, when status is suppressed. Open enum dnc_listed, consent_required, contact_daily_limit_reached, unknown.

CampaignRecipientList

A page of campaign recipients, in a stable order.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​CampaignRecipient[] · required

Recipients on this page.

CampaignRecipientsAddRequest

Add contacts to a draft campaign as recipients.
contact_ids
​string[] · minItems: 1 · maxItems: 1000 · unique · required

Contacts to add. Contacts already in the campaign are skipped, not duplicated.

CampaignRecipientsAddResult

Result of adding recipients.
object
​string · const · required

Always campaign_recipients_added.

Const value: campaign_recipients_added
livemode
​boolean · required

Mode of the campaign.

campaign_id
​string · required

The campaign.

added
​integer · min: 0 · required

Recipients newly added by this request (contacts already in the campaign are not counted).

recipient_count
​integer · min: 0 · required

Total recipients in the campaign now.

CampaignUpdateRequest

Fields to change. Omitted fields are left as they are. Changes apply from the next start.
name
​string · minLength: 1 · maxLength: 200

Campaign name.

agent_id
​string · pattern: ^agent_[A-Za-z0-9_-]…

The agent that makes the calls.

concurrency_limit
​integer · min: 1 · max: 100

Most simultaneous calls.

​

The spend at which the campaign is paused, or null to remove the cap. When the campaign's spend reaches the cap the campaign is paused. The check runs about every 15 minutes, so spend can exceed the cap by the calls placed in that time.

Contact

A person you call. Phone numbers are unique within a workspace and mode. Custom field values become call variables: an agent can use `{{field_name}}` in its prompt.
id
​string · pattern: ^ct_[A-Za-z0-9_-]{1,… · required

Contact id (ct_...).

object
​string · const · required

Always contact.

Const value: contact
livemode
​boolean · required

true for a live contact, false for a test-mode contact.

phone_number
​string · required

The contact's number. E.164 for contacts created through this API; contacts created earlier in the console may hold the number in the format it was entered.

name
​string | null · required

Display name.

language
​string | null · required

Preferred language, as free text or a language code.

country_code
​string | null · required

Country code as entered, for example IN.

consent_granted
​boolean · required

Whether the contact has consented to be called. When the workspace requires consent (a console compliance setting), calls to a contact without consent are refused. Setting this through the API records that consent was given; only set it when it really was. Consent is never recorded on a contact that is on the do-not-call list: it stays false there, and removing the entry does not restore it.

do_not_call
​boolean · required

True when the contact's number is on the do-not-call list. Read-only here: manage it with the do-not-call endpoints. Adding a number to the list also withdraws the contact's consent.

​object · required

Values of the workspace's custom fields for this contact, by field name. Fields are defined in the console.

created_at
​string | null · date-time · required

When the contact was created. Null for some contacts created before this was recorded.

ContactCreateRequest

Create a contact.
phone_number
​string · e164 · required

The contact's number in E.164 format.

name
​string · minLength: 1 · maxLength: 200

Display name.

language
​string · maxLength: 50

Preferred language.

country_code
​string · minLength: 2 · maxLength: 10

Country code, for example IN.

consent_granted
​boolean

Set to true only when the person has consented to be called. Recorded with the time and the API as its source.

Default: false
​CustomFieldValues · maxProps: 100

Custom field values by field name. Each key must be a custom field defined in the console; an unknown name is 422 custom_field_not_found. Values are strings up to 500 characters. On update, a null value clears that field and omitted fields are left unchanged.

ContactList

A page of contacts, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​Contact[] · required

Contacts on this page.

ContactUpdateRequest

Fields to change. Omitted fields are left as they are.
phone_number
​string · e164

New number in E.164 format. Must not belong to another contact.

name
​string | null · maxLength: 200

Display name. Null clears it.

language
​string | null · maxLength: 50

Preferred language. Null clears it.

country_code
​string | null · maxLength: 10

Country code. Null clears it.

consent_granted
​boolean

True records that consent was given; false records that it was withdrawn.

​CustomFieldValues · maxProps: 100

Custom field values by field name. Each key must be a custom field defined in the console; an unknown name is 422 custom_field_not_found. Values are strings up to 500 characters. On update, a null value clears that field and omitted fields are left unchanged.

ContactUpsertRequest

Create the contact with this phone number, or update it if it exists. Matching is by phone number in the same way the do-not-call check matches numbers.
phone_number
​string · e164 · required

The contact's number in E.164 format. Identifies the contact.

name
​string | null · maxLength: 200

Display name. Null clears it.

language
​string | null · maxLength: 50

Preferred language. Null clears it.

country_code
​string | null · maxLength: 10

Country code. Null clears it.

consent_granted
​boolean

Set to true only when the person has consented to be called; false records withdrawal. Omit to leave unchanged.

​CustomFieldValues · maxProps: 100

Custom field values by field name. Each key must be a custom field defined in the console; an unknown name is 422 custom_field_not_found. Values are strings up to 500 characters. On update, a null value clears that field and omitted fields are left unchanged.

CustomFieldValues

Custom field values by field name. Each key must be a custom field defined in the console; an unknown name is `422 custom_field_not_found`. Values are strings up to 500 characters. On update, a null value clears that field and omitted fields are left unchanged.
string | null · maxLength: 500

DeletedObject

Returned by a successful delete. The object no longer exists.
id
​string · required

Id of the deleted object.

object
​string · required

Type of the deleted object, for example contact.

livemode
​boolean · required

true for live mode, false for test mode.

deleted
​boolean · const · required

Always true.

Const value:

DncEntry

A number on the workspace do-not-call list. When it is checked, in both modes: every POST /v1/calls (`422 dnc_listed`), every campaign start (the number is left out) and every resume (the resume is refused while a remaining recipient is listed). A campaign that is already running is not screened again: pause and resume it, or stop it. Matching ignores formatting: a number matches by its digits, and by its last ten digits when both numbers have at least ten.
id
​string · pattern: ^dnc_[A-Za-z0-9_-]{1… · required

Entry id (dnc_...).

object
​string · const · required

Always dnc_entry.

Const value: dnc_entry
livemode
​boolean · required

Mode of the entry. Test-mode entries apply only to test-mode calls.

phone_number
​string · required

The number.

contact_id
​string | null · required

The contact with this number, if there is one.

created_at
​string | null · date-time · required

When the number was added to the list. Recorded in test mode; null in live mode, where the time is not stored yet.

DncEntryCreateRequest

Add a number to the do-not-call list.
phone_number
​string · e164 · required

The number in E.164 format.

DncEntryList

A page of do-not-call entries, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​DncEntry[] · required

Entries on this page.

Error

The error envelope. Every non-2xx response has this shape. Branch on `error.code` (stable) and `error.retry`; never parse `error.message`, which is written for people and may change.
​object · required

The error.

EventBase

Fields every event has. An event is delivered as the JSON body of a POST to your endpoint, signed with the `RelationsAI-Signature` header.
id
​string · pattern: ^evt_[A-Za-z0-9_-]{1… · required

Event id (evt_...). The same event can be delivered more than once; use this to discard duplicates.

object
​string · const · required

Always event.

Const value: event
type
​WebhookEventType · enum · required

An event type. Open enum; new types can be added.

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
created_at
​string · date-time · required

When the event happened.

livemode
​boolean · required

Mode of the event.

api_version
​string · required

Version of the payload format, a date. Today 2026-10-21.

ExtractedField

One extracted field.
name
​string · required

Field name as configured on the agent.

type
​string · required

Declared type of the field, for example string, number, boolean. Open enum.

state
​string · enum · required

ready, pending, absent (not mentioned in the call) or failed. Open enum.

Enum values:
pending
ready
absent
failed
value
​string | number | integer | boolean | null · required

The extracted value, typed per type. Null unless state is ready.

ListMeta

Fields shared by every list response. Lists are newest first unless an operation says otherwise.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

Metadata

Your own key-value data, stored with the object and returned as sent. Up to 16 keys; keys up to 40 characters (letters, digits, `_`, `-`, `.`), values strings up to 500 characters. Never sent to the person called and never used by the agent. Do not put secrets here.
string · maxLength: 500

Money

An amount of money as charged to your workspace, in the currency's minor unit (for INR, paise: `1250` is ₹12.50).
amount
​integer · min: 0 · required

Amount in the minor unit of currency. Never negative.

currency
​string · pattern: ^[A-Z]{3}$ · required

ISO 4217 currency code. Open enum; today always INR.

Example: INR

MoneyInput

An amount of money in the currency's minor unit. The currency must be the workspace currency.
amount
​integer · min: 1 · max: 100000000000 · required

Amount in the minor unit of currency (for INR, paise). At least 1.

currency
​string · enum · required

ISO 4217 code. Must be INR today.

Enum values:
INR

PhoneNumber

A phone number your workspace can call from or be called on. Numbers are added and assigned to agents in the console. An outbound call shows the caller number chosen for it; by default that is the number assigned to the agent for outbound calls.
id
​string · pattern: ^pn_[A-Za-z0-9_-]{1,… · required

Phone number id (pn_...).

object
​string · const · required

Always phone_number.

Const value: phone_number
livemode
​boolean · required

Mode of the key that read it. Numbers are shared configuration, readable in both modes.

number
​string · pattern: ^\+[1-9][0-9]{7,14}$ · required

The number in E.164 format.

label
​string | null · required

Label given in the console, if any.

status
​string · enum · required

active numbers can be used. pending numbers are still being set up. Open enum.

Enum values:
active
pending
unknown
​object · required

What the number supports.

inbound_agent_id
​string | null · required

The agent of this workspace that answers calls to this number, if any.

outbound_agent_ids
​string[] · required

Agents of this workspace that call from this number.

sample
​boolean · required

True only for the built-in sample number that exists in test mode.

PhoneNumberList

A page of phone numbers.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​PhoneNumber[] · required

Phone numbers on this page.

RateLimitClass

One rate-limit class. Null means that dimension is not limited separately.
per_key_per_minute
​integer | null · min: 1 · required

Requests per minute allowed for one key.

per_workspace_per_minute
​integer | null · min: 1 · required

Requests per minute allowed across all keys of the workspace in this mode.

TranscriptTurn

One turn of the conversation.
index
​integer · min: 0 · required

Position of the turn, from 0.

speaker
​string · enum · required

agent or caller (the person called). Open enum.

Enum values:
agent
caller
text
​string · required

What was said.

start_ms
​integer | null · min: 0 · required

Start of the turn in milliseconds from the start of the call, when known.

end_ms
​integer | null · min: 0 · required

End of the turn in milliseconds from the start of the call, when known.

WebhookDelivery

One event's delivery to one endpoint, with its attempts so far.
id
​string · pattern: ^wd_[A-Za-z0-9_-]{1,… · required

Delivery id (wd_...).

object
​string · const · required

Always webhook_delivery.

Const value: webhook_delivery
livemode
​boolean · required

Mode of the event.

webhook_endpoint_id
​string · required

The endpoint.

event_id
​string · required

The event delivered (evt_...). Also sent as the RelationsAI-Event-Id header.

event_type
​WebhookEventType · enum · required

An event type. Open enum; new types can be added.

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
status
​string · enum · required

pending (first attempt not made yet), retrying (failed, another attempt is scheduled), succeeded (your server answered 2xx), failed (every attempt failed). Open enum.

Enum values:
pending
retrying
succeeded
failed
attempts
​integer · min: 0 · required

Attempts made so far.

last_attempt_at
​string | null · date-time · required

When the last attempt was made.

next_attempt_at
​string | null · date-time · required

When the next attempt is scheduled, if any.

response_status
​integer | null · required

HTTP status of your server's last answer, if it answered.

duration_ms
​integer | null · min: 0 · required

How long the last attempt took.

error
​string | null · enum · required

Why the last attempt failed: timeout (no answer in 10 seconds), connection_failed (including a host name that did not resolve in time), tls_error, blocked_destination (the URL resolved to a non-public address), http_error (a non-2xx answer), signing_failed (RelationsAI could not sign the delivery; nothing was sent, the attempt still counts, and the delivery fails after its last attempt like any other; contact support if it persists). Null if it succeeded. Open enum.

Enum values:
timeout
connection_failed
tls_error
blocked_destination
http_error
signing_failed
created_at
​string · date-time · required

When the delivery was created.

WebhookDeliveryList

A page of deliveries, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​WebhookDelivery[] · required

Deliveries on this page.

WebhookEndpoint

A URL on your server that receives signed event notifications for one mode. Deliveries are at-least-once and not ordered; use the event `id` to discard duplicates and the resource's own timestamps or status to discard stale updates.
id
​string · pattern: ^we_[A-Za-z0-9_-]{1,… · required

Endpoint id (we_...).

object
​string · const · required

Always webhook_endpoint.

Const value: webhook_endpoint
livemode
​boolean · required

The endpoint receives events of this mode only.

url
​string · uri · required

Where events are delivered.

description
​string | null · required

Your note about the endpoint.

events
​WebhookSubscribableEventType[] · required

Event types delivered to this endpoint. The test event is delivered on request regardless of this list.

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
status
​string · enum · required

enabled endpoints receive deliveries; disabled ones do not. Open enum.

Enum values:
enabled
disabled
secret_last4
​string · required

Last four characters of the current signing secret, to tell secrets apart.

created_at
​string · date-time · required

When the endpoint was created.

updated_at
​string · date-time · required

When the endpoint was last changed.

​required

The most recent delivery attempt, or null if none yet.

WebhookEndpointCreateRequest

Create a webhook endpoint in the key's mode.
url
​string · uri · maxLength: 2048 · pattern: ^https:// · required

Must start with https://; any other scheme is refused with 400 validation_error (issue invalid_format) before the URL is checked. Then: port 443 only, no user name or password, not a RelationsAI host, and the host must resolve only to public internet addresses, otherwise 422 webhook_url_not_allowed. Checked when created, when changed, and again on every delivery.

events
​WebhookSubscribableEventType[] · minItems: 1 · unique · required

Event types to deliver. webhook_endpoint.test cannot be subscribed to (the test operation always delivers it).

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
description
​string · maxLength: 500

Your note about the endpoint.

WebhookEndpointList

A page of webhook endpoints, newest first.
object
​string · const · required

Always list.

Const value: list
has_more
​boolean · required

True when more objects exist after this page.

next_cursor
​string | null · required

Pass as cursor (with the same filters) to fetch the next page. Null on the last page.

​WebhookEndpoint[] · required

Endpoints on this page.

WebhookEndpointUpdateRequest

Fields to change. Omitted fields are left as they are.
url
​string · uri · maxLength: 2048 · pattern: ^https://

Must start with https://; any other scheme is refused with 400 validation_error (issue invalid_format) before the URL is checked. Then: port 443 only, no user name or password, not a RelationsAI host, and the host must resolve only to public internet addresses, otherwise 422 webhook_url_not_allowed. Checked when created, when changed, and again on every delivery.

description
​string | null · maxLength: 500

Your note about the endpoint. Null clears it.

events
​WebhookSubscribableEventType[] · minItems: 1 · unique

Event types to deliver. Replaces the current list. webhook_endpoint.test cannot be subscribed to (the test operation always delivers it).

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
status
​string · enum

enabled or disabled.

Enum values:
enabled
disabled

WebhookEndpointWithSecret

A webhook endpoint together with its signing secret. The secret is shown only in this response; store it now.
id
​string · pattern: ^we_[A-Za-z0-9_-]{1,… · required

Endpoint id (we_...).

object
​string · const · required

Always webhook_endpoint.

Const value: webhook_endpoint
livemode
​boolean · required

The endpoint receives events of this mode only.

url
​string · uri · required

Where events are delivered.

description
​string | null · required

Your note about the endpoint.

events
​WebhookSubscribableEventType[] · required

Event types delivered to this endpoint. The test event is delivered on request regardless of this list.

Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
status
​string · enum · required

enabled endpoints receive deliveries; disabled ones do not. Open enum.

Enum values:
enabled
disabled
secret_last4
​string · required

Last four characters of the current signing secret, to tell secrets apart.

created_at
​string · date-time · required

When the endpoint was created.

updated_at
​string · date-time · required

When the endpoint was last changed.

​required

The most recent delivery attempt, or null if none yet.

secret
​string | null · pattern: ^whsec_[A-Za-z0-9_-]… · required

The signing secret (whsec_...), shown only in the first response to the create or rotate request. null on an idempotent replay of that request (same Idempotency-Key): the secret is stored only encrypted and is never returned again. If it was lost, rotate the secret.

WebhookEventType

string · enum
Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed

An event type. Open enum; new types can be added.

WebhookSecretRotateRequest

How long the previous secret keeps signing deliveries alongside the new one.
grace_period_hours
​integer · enum · required

Hours during which every delivery carries two signatures, one per secret, so you can deploy the new secret without dropping events. 0 retires every previous secret immediately (always allowed, also during a grace period). A value above 0 during a running grace period keeps the oldest secret still signing until its original grace end and discards the one in between.

Enum values:
0
1
24
168

WebhookSubscribableEventType

string · enum
Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed

An event type an endpoint can subscribe to. Open enum; new types can be added. webhook_endpoint.test is not in this list: it cannot be subscribed to, and is delivered only by POST /v1/webhook-endpoints/{webhook_endpoint_id}/test, to that endpoint, whatever its subscriptions.

WebhookTestEvent

A test event sent with POST /v1/webhook-endpoints/{webhook_endpoint_id}/test. `data.object` is the endpoint.
id
​string · pattern: ^evt_[A-Za-z0-9_-]{1… · required

Event id (evt_...). The same event can be delivered more than once; use this to discard duplicates.

object
​string · const · required

Always event.

Const value: event
type
​WebhookEventType · enum · const · required

Always webhook_endpoint.test.

Const value: webhook_endpoint.test
Enum values:
call.ended
call.settled
campaign.started
campaign.paused
campaign.resumed
campaign.stopped
campaign.completed
campaign.failed
created_at
​string · date-time · required

When the event happened.

livemode
​boolean · required

Mode of the event.

api_version
​string · required

Version of the payload format, a date. Today 2026-10-21.

​object · required

Event data.

Workspace

The workspace the API key belongs to, the key itself, and what the workspace can do through the API in the key's mode. Call it first to check a key, its scopes and its limits.
id
​string · pattern: ^ws_[A-Za-z0-9_-]{1,… · required

Workspace id (ws_...).

object
​string · const · required

Always workspace.

Const value: workspace
livemode
​boolean · required

true when the key is a live key, false for a test key.

name
​string · required

Workspace name as shown in the console.

timezone
​string · required

IANA timezone of the workspace. Calling hours (if enabled in the console) are evaluated in it.

Example: Asia/Kolkata
currency
​string · pattern: ^[A-Z]{3}$ · required

Currency calls are charged in (ISO 4217). Open enum; today always INR.

​WorkspaceApiKey · required

The API key this request was authenticated with. The secret itself is never returned.

​WorkspaceCapabilities · required

What this workspace can do through the API. A false here means the feature is not offered today, so a client can adapt instead of discovering it from errors.

​WorkspaceLimits · required

Limits that apply to this key and workspace in the key's mode.

WorkspaceApiKey

The API key this request was authenticated with. The secret itself is never returned.
id
​string · pattern: ^key_[A-Za-z0-9_-]{1… · required

Key id (key_...). Shown in the console next to the key.

name
​string · required

The name given to the key when it was created.

environment
​string · enum · required

test for rai_test_ keys, live for rai_live_ keys.

Enum values:
test
live
scopes
​string[] · required

Scopes this key can use right now: the scopes it was created with, limited to what its creator's current role allows.

created_at
​string · date-time · required

When the key was created.

expires_at
​string | null · date-time · required

When the key stops working. Null for a test key created without expiry.

WorkspaceCapabilities

What this workspace can do through the API. A `false` here means the feature is not offered today, so a client can adapt instead of discovering it from errors.
campaign_pause
​boolean · required

Running campaigns can be paused.

campaign_resume
​boolean · required

Paused campaigns can be resumed (continuing the same run).

call_ringing_status
​boolean · required

Calls report a separate ringing status. When false, a call goes from queued straight to in_progress or ended.

live_transcript
​boolean · required

Transcripts can be read while a call is in progress. When false, transcripts are available after the call ends.

sentiment_analysis
​boolean · required

Call analysis includes sentiment. When false, analysis has a summary, extracted fields and the goal outcome only.

end_call
​boolean · required

Calls can be hung up through the API.

agent_editing
​boolean · required

Agents can be created or edited through the API. When false, use the console.

inbound_calls
​boolean · required

Inbound calls appear in the call list.

webhooks
​boolean · required

Webhook endpoints can be created and events are delivered.

WorkspaceLimits

Limits that apply to this key and workspace in the key's mode.
​object · required

Requests per minute by rate-limit class. Each operation shows its class as x-rate-limit-class.

daily_call_limit
​integer | null · min: 0 · required

Calls this workspace may place through the API per UTC day in live mode. Null in test mode, which has no daily cap.

campaign_max_concurrency
​integer · min: 1 · required

Most simultaneous calls a campaign can run with on the workspace's plan. A higher concurrency_limit is lowered to this at start.