Skip to content
Docs menu

Place a notification call

POST /v1/calls/notifications — Place a notification call

.md
MethodPathScopeMCP action
POST/v1/calls/notificationsvoice:writeplace_notification_call

Description

One automated call to any number (E.164) from one of the organization’s numbers (phone_number_id: its id or the number itself): mode: message speaks text once in voice and ends the call (text to speech is paid, ai.speech); mode: agent has the voice AI agent talk with the person who answers, following instructions, in voice, and hand the call to the number’s members when needed. No variables: the text is final as sent. No consent check and no sending hours. The first minute is held before anything is made or dialled; minutes are charged as any outbound call (free on an own number). The contact is found or created by the number. The same Idempotency-Key returns the same call and never places a second one. Its end reaches the call.ended webhook and GET /v1/calls/{callId}. Needs campaigns.send.

Authentication

Send Authorization: Bearer <key> with an API key or OAuth app that holds the scope voice:write. A test key rbk_test_… works on the test space and reaches no customer.

Parameters

NameInTypeRequiredDescription
Rabt-Organizationheaderstring (uuid)noThe organization the request acts in (its id). Needed with a session, and with a personal key or app that acts in several organizations (API-8155); it must be one of the credential's (API-8105).
Idempotency-KeyheaderstringyesA key of your choice for this top-up (letters, digits and . _ : - /, at most 200 characters). Retrying with the same key returns the same top-up and never charges twice.

Request body

application/json — Required: yes

FieldsTypeRequiredDescription
tostringyesThe number to call, E.164 (any number; no contact is needed beforehand).
phone_number_idstring (uuid) | stringyesThe organization’s number it calls from: its id, or the number itself in E.164 (+966920034134, its active number with it; VOI-4578 otherwise).
voice"female" | "male"yesThe voice of the message or of the AI call: female or male.
mode"message" | "agent"yesmessage: text is spoken once and the call ends; agent: the voice AI agent talks, following instructions.
textstringnoThe message (mode: message), final as sent: no variables.
instructionsstringnoWhat the voice AI agent says and asks (mode: agent, Markdown), final as sent: no variables.

Request example

{
  "to": "+15555550100",
  "phone_number_id": "4d71418e-77d2-46ac-a4d9-5a5b483ee576",
  "voice": "female",
  "mode": "message",
  "text": "Hello, how can we help?",
  "instructions": "example"
}

Responses

StatusDescriptionSchema
201The call, placed.NotificationCall
400AUTH-1041: no organization was named (send its id in the Rabt-Organization header). API-8155: the personal key or app acts in several organizations and the request named none.ProblemDetails
401AUTH-1001: not signed in, or the session has ended. API-8101: the API key or access token is not valid.ProblemDetails
402WAL-1001: the wallet cannot hold the first minute.ProblemDetails
403AUTH-1040: you are not a member of the organization named. AUTH-1003: your seat was deactivated (view only). AUTH-1004: all seats are inactive because the seat charge was not paid (view only). AUTH-1002: your role lacks the campaigns.send permission. API-8102: the API key or app lacks the voice:write scope. API-8105: the Rabt-Organization header names an organization the API key or app does not act in. API-8148: not available to test keys (API test mode).ProblemDetails
404VOI-4500: no such number in this organization. VOI-4578: no active number of the organization with this E.164.ProblemDetails
409VOI-4501, VOI-4503: the number cannot call now. CAMP-6326: the organization stopped its AI agent. API-8148: not in a test space.ProblemDetails
422API-8001: some fields are missing or not valid. details.fields lists each invalid field with its own code (e.g. API-8002 required, API-8012 wrong format). VOI-4507 to VOI-4510, VOI-4512: the destination is not allowed. API-8001: text for a message, instructions for an AI call.ProblemDetails
429API-8004: a rate limit quota is used up (see RateLimit). Try again after Retry-After seconds. VOI-4564: every line of the number is busy (retryable: try again once a call on it ends).ProblemDetails
503SYS-1001: voice, object storage or text to speech is not configured.ProblemDetails
defaultAny other error, with its code: e.g. API-8005 the body is not valid JSON, API-8006 the body is too large, API-8007 the body is not JSON, API-8008 no such endpoint, API-8009 the request cannot be read, API-8010 the request took too long, API-8022 or API-8023 the body compression or character set is not supported, AUTH-1014 a change sent with the session cookie (or a sign-in) that does not come from a Rabt web page, SYS-1002 or SYS-1011 a dependency is unreachable, SYS-1041 the organization is using its full share of the server, SYS-1042 the server is overloaded (retry after Retry-After), SYS-1070 Rabt is in read-only mode during an incident (changes are refused; reading works), SYS-1071 a non-essential feature (search) is paused during an incident, SYS-9000 an unexpected error.ProblemDetails

Response example (201)

{
  "call_id": "e3ed61c8-3014-4fa0-a7ec-fa0f7a387802",
  "status": "example",
  "contact_id": "6d17dd3f-a837-4e3a-ad16-a563031b5b3a",
  "replayed": true
}

Errors

Call it

curl -X POST 'https://api.rabt.systems/v1/calls/notifications' \
  -H "Authorization: Bearer $RABT_API_KEY" \
  -H 'Idempotency-Key: 7f3c1d2e-0000-4000-8000-000000000001' \
  -H 'Content-Type: application/json' \
  -d '{"to":"+15555550100","phone_number_id":"4d71418e-77d2-46ac-a4d9-5a5b483ee576","voice":"female","mode":"message","text":"Hello, how can we help?","instructions":"example"}'

Through MCP

The action place_notification_call is the same operation with the same permissions and errors (see the MCP guide).

{
  "action": "place_notification_call",
  "params": {
    "to": "+15555550100",
    "phone_number_id": "4d71418e-77d2-46ac-a4d9-5a5b483ee576",
    "voice": "female",
    "mode": "message",
    "text": "Hello, how can we help?",
    "instructions": "example"
  }
}