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

Numbers that must never be called. Checked, in both modes, on every POST /v1/calls, when a campaign starts and when it resumes (the resume re-screens). A number added while a campaign is running is not removed from that run: pause and resume the campaign to re-screen it, or stop the campaign.


List or look up do-not-call entries

GET
https://voice-api.relationsai.com/v1
/dnc-entries
Bearer (rai_test_... or rai_live_...)

Lists the do-not-call list: in test mode newest entry first; in live mode by the contact, newest first (live mode does not record when an entry was added). To check one number, pass phone_number: the result has one entry if the number is on the list and none if it is not, using the same matching as the call check (formatting is ignored).

GET /v1/dnc-entries · Operation ID: listDncEntries

List or look up do-not-call entries › query Parameters

limit
​integer · min: 1 · max: 100

Maximum number of objects to return, from 1 to 100. Defaults to 25.

Default: 25
cursor
​string · minLength: 1 · maxLength: 512

The next_cursor of the previous page. Send it with exactly the same filters as the request that returned it; a changed filter set is 400 invalid_cursor.

phone_number
​string · e164

Look up one number (E.164).

List or look up do-not-call entries › Responses

A page of entries.

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.


Add a number to the do-not-call list

POST
https://voice-api.relationsai.com/v1
/dnc-entries
Bearer (rai_test_... or rai_live_...)

Adds a number to the workspace do-not-call list, in the key's mode. From then on calls to it are refused, campaigns leave it out when they start, and a paused campaign that still holds it cannot be resumed. A campaign that is already running is not screened again: pause and resume it (the resume is then refused while the number is a remaining recipient) or stop it.

If a contact has this number, it is marked do_not_call: true and its consent is withdrawn. If no contact has it, a contact holding only the number is created so the number is visible in the console. Adding a number that is already on the list returns the existing entry with 200.

POST /v1/dnc-entries · Operation ID: createDncEntry

Add a number to the do-not-call list › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 255 · pattern: ^[\x21-\x7E]+$

Optional. A unique key for this operation, 1 to 255 printable ASCII characters with no spaces (a UUID v4 is ideal). With it, a retry of the same request (same key, same body) returns the stored answer and never runs the action twice; reuse the same key for every retry, it is kept for 24 hours. Without it, every request runs: a retry after a timeout can repeat the action, so check the state with a GET before retrying.

Add a number to the do-not-call list › Request Body

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

The number in E.164 format.

Add a number to the do-not-call list › Responses

The number was already on the list; the existing entry is returned.

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.


Remove a number from the do-not-call list

DELETE
https://voice-api.relationsai.com/v1
/dnc-entries/{dnc_entry_id}
Bearer (rai_test_... or rai_live_...)

Removes a number from the do-not-call list, so it can be called again. The removal is recorded in the workspace audit log with the API key that made it. Consent is not restored: if the workspace requires consent, record it again on the contact only if the person gives it.

DELETE /v1/dnc-entries/{dnc_entry_id} · Operation ID: deleteDncEntry

Remove a number from the do-not-call list › path Parameters

dnc_entry_id
​string · pattern: ^dnc_[A-Za-z0-9_-]{1… · required

The do-not-call entry id (dnc_...).

Remove a number from the do-not-call list › Headers

Idempotency-Key
​string · minLength: 1 · maxLength: 255 · pattern: ^[\x21-\x7E]+$

Optional. A unique key for this operation, 1 to 255 printable ASCII characters with no spaces (a UUID v4 is ideal). With it, a retry of the same request (same key, same body) returns the stored answer and never runs the action twice; reuse the same key for every retry, it is kept for 24 hours. Without it, every request runs: a retry after a timeout can repeat the action, so check the state with a GET before retrying.

Remove a number from the do-not-call list › Responses

The number is no longer on the list.

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: