API reference

Phone and messaging

Numbers, calls, call flows, text messages, WhatsApp and verification.

Scopes for this area: voice:read, voice:write and voice:admin.

90 operations

number

MethodRouteWhat it doesLevelCommand
GET/numbersThe project's phone numbers.readrivier voice number list
GET/numbers/costWhat the numbers cost this month.readrivier voice number cost
GET/numbers/searchNumbers available to buy.readrivier voice number search
POST/numbersAsk to buy a number. Nothing is bought: the price is recorded and a signed-in owner or manager confirms it.writerivier voice number buy
GET/numbers/{id}One number with its agents.readrivier voice number get
PATCH/numbers/{id}Change a number's settings.writerivier voice number update
POST/numbers/{id}/releaseGive a number back.writerivier voice number release
POST/numbers/{id}/suspendPause a number.writerivier voice number suspend
POST/numbers/{id}/resumeResume a number.writerivier voice number resume
POST/numbers/{id}/onboarding/{kind}Record a carrier onboarding step.writerivier voice number onboarding
GET/numbers/{id}/agentsThe agents that answer a number.readrivier voice number agents
PUT/numbers/{id}/agents/{agentId}Let an agent answer a number.writerivier voice number add agent
DELETE/numbers/{id}/agents/{agentId}Stop an agent answering a number.writerivier voice number remove agent

catalogue

MethodRouteWhat it doesLevelCommand
GET/voice/catalogueThe voices on offer.readrivier voice catalogue list
POST/voice/catalogue/refreshRefresh the voice list from the provider.writerivier voice catalogue refresh
PUT/voice/catalogue/{voice}/previewStore a preview clip for a voice.writerivier voice catalogue preview

profile

MethodRouteWhat it doesLevelCommand
GET/voice/projectThe project's voice profile.readrivier voice profile project
POST/voice/projectPropose the project's voice profile.writerivier voice profile propose project
POST/voice/profiles/{id}/submitSend a voice profile for approval.writerivier voice profile submit
POST/voice/profiles/{id}/approveApprove a voice profile.writerivier voice profile approve
POST/voice/profiles/{id}/rejectSend a voice profile back.writerivier voice profile reject

session

MethodRouteWhat it doesLevelCommand
GET/voice/sessionsVoice sessions.readrivier voice session list
GET/voice/sessions/{id}One voice session.readrivier voice session get
GET/voice/sessions/{id}/transcriptThe transcript of a session.readrivier voice session transcript
POST/voice/sessions/{id}/endEnd a session.writerivier voice session end
POST/voice/sessions/{id}/transferHand a session to a person.writerivier voice session transfer

workspace number

MethodRouteWhat it doesLevelCommand
GET/workspace/numbersThe phone numbers of the workspace.readrivier voice workspace number list
GET/workspace/numbers/availableNumbers available to take.readrivier voice workspace number available
POST/workspace/numbersAsk to take a number. Nothing is bought until a signed-in owner or manager confirms the price.writerivier voice workspace number take
DELETE/workspace/numbers/{id}Give a number back.writerivier voice workspace number release

phone status

MethodRouteWhat it doesLevelCommand
GET/phone/statusWhether the phone account is live, in test mode or a mock, and the addresses the carrier calls back on.readrivier voice phone status get

phone message

MethodRouteWhat it doesLevelCommand
POST/phone/messagesSend a text, a picture message or a WhatsApp message. Checks opt-out, agreement, the WhatsApp window, the country's rules and the plan allowance first, and refuses with a plain reason and the next step rather than dropping anything. Marketing needs the person's recorded agreement.writerivier voice phone message send
GET/phone/messagesRecent texts and WhatsApp messages, both ways, with where each one stands.readrivier voice phone message list
GET/phone/messages/{id}One message and where it stands.readrivier voice phone message get

phone conversation

MethodRouteWhat it doesLevelCommand
GET/phone/conversationsConversations by person, newest first, with the ones waiting for an answer marked.readrivier voice phone conversation list
GET/phone/conversations/{peer}Everything said with one person, whether they have agreed to hear from you, and until when a WhatsApp reply can be free text.readrivier voice phone conversation get

phone contact

MethodRouteWhat it doesLevelCommand
POST/phone/opt-inRecord how and where a person agreed to receive messages. Needed before marketing and before a WhatsApp template to someone who has not written first.writerivier voice phone contact opt in
POST/phone/opt-outRecord that a person does not want messages. They stay off the list until they opt back in.writerivier voice phone contact opt out
DELETE/phone/people/{peer}Remove every message and agreement record held for one phone number.writerivier voice phone contact erase

phone sender

MethodRouteWhat it doesLevelCommand
GET/phone/sendersEverything the project can send from: its numbers, sender names and WhatsApp numbers, and which are ready.readrivier voice phone sender list
POST/phone/sendersAdd a sender name or a WhatsApp number. A name that a country wants registered waits until the registration is approved.writerivier voice phone sender add
DELETE/phone/senders/{id}Remove a sender name or WhatsApp number.writerivier voice phone sender remove

phone service

MethodRouteWhat it doesLevelCommand
GET/phone/servicesMessaging services: pools of numbers that send as one, keeping each person with the same number.readrivier voice phone service list
POST/phone/servicesCreate a messaging service, optionally with numbers already in its pool.writerivier voice phone service create
POST/phone/services/{id}/poolPut a number into a messaging service's pool.writerivier voice phone service add number
DELETE/phone/services/{id}/pool/{senderId}Take a number out of a messaging service's pool.writerivier voice phone service drop number
DELETE/phone/services/{id}Delete a messaging service.writerivier voice phone service delete

phone template

MethodRouteWhat it doesLevelCommand
GET/phone/templatesWhatsApp message templates and whether WhatsApp has approved each.readrivier voice phone template list
POST/phone/templatesWrite a WhatsApp template. Placeholders are {{1}}, {{2}}. It cannot be sent until WhatsApp approves it.writerivier voice phone template create
POST/phone/templates/{id}/submitSend a template to WhatsApp for approval.writerivier voice phone template submit
POST/phone/templates/{id}/refreshAsk WhatsApp where a template's approval stands.writerivier voice phone template refresh
DELETE/phone/templates/{id}Delete a template.writerivier voice phone template delete

phone number

MethodRouteWhat it doesLevelCommand
GET/phone/numbers/searchPhone numbers available to buy in a country, with monthly price and what the country requires. Searching costs nothing and buys nothing.readrivier voice phone number search

phone purchase

MethodRouteWhat it doesLevelCommand
POST/phone/purchasesAsk to buy a number. Nothing is bought: this records the price and waits for a person to confirm it.writerivier voice phone purchase request
GET/phone/purchasesRequests to buy a number and how each ended.readrivier voice phone purchase list
POST/phone/purchases/{id}/confirmConfirm a purchase request: the number is bought and the monthly cost starts. Only a signed-in person can do this.writerivier voice phone purchase confirm
POST/phone/purchases/{id}/declineDecline a purchase request.writerivier voice phone purchase decline

phone registration

MethodRouteWhat it doesLevelCommand
GET/phone/registrationsWhat each country asks of a sender (sender names, 10DLC, toll-free verification, DLT), where each registration stands, and what it needs from the owner.readrivier voice phone registration list
PUT/phone/registrationsRecord where a registration stands, with the details the owner entered.writerivier voice phone registration set

verify service

MethodRouteWhat it doesLevelCommand
GET/verify/servicesThe project's verification services: each one is a set of rules for one-time codes (channels, code length, expiry, attempt limits, rate limits, fraud guards).readrivier verify services
GET/verify/services/{id}One verification service with all its settings.readrivier verify service
POST/verify/servicesCreate a verification service. Defaults are safe: text, call and email, six digits, ten minutes, five tries, rate limits per destination and network address, premium-rate numbers refused.writerivier verify service-create
PUT/verify/services/{id}Change a verification service. Existing verifications keep running under the rules they started with.writerivier verify service-update
DELETE/verify/services/{id}Delete a verification service and its verifications.writerivier verify service-delete

verify funnel

MethodRouteWhat it doesLevelCommand
GET/verify/services/{id}/funnelHow many verifications started, were approved and failed in the last hours, and the conversion share: the first number to read when a service is attacked.readrivier verify funnel

verify start

MethodRouteWhat it doesLevelCommand
POST/verify/services/{id}/verificationsSend a one-time code to a phone number or an email address. channel auto uses the service's order and falls back by itself when a channel fails. Rate limits, fraud guards, opt-outs and the plan's allowance are checked first; a refusal says which rule and what to do. The code itself is never returned (only in the mock, where nothing is sent).writerivier verify start

verify check

MethodRouteWhat it doesLevelCommand
POST/verify/services/{id}/checkCheck the code a person typed, by destination or verification id. Answers valid and the status (pending, approved, expired or out of tries); a wrong code leaves the verification pending until the tries run out.writerivier verify check

verify attempt

MethodRouteWhat it doesLevelCommand
GET/verify/verificationsVerifications, newest first: filter by service, status, channel, destination or time. Each shows its send attempts by channel.readrivier verify list
GET/verify/verifications/{vid}One verification with its status, attempts per channel and why a channel failed.readrivier verify get
POST/verify/verifications/{vid}/cancelCancel a pending verification: its code stops working.writerivier verify cancel
POST/verify/verifications/{vid}/fallbackSend the code through another channel (the next one in the service's order, or the one named) when the person did not receive it.writerivier verify fallback

lookup number

MethodRouteWhat it doesLevelCommand
GET/lookup/validateCheck the format of a phone number without a network call: valid or not, why, its country, a readable form, and whether its shape says mobile, toll-free or premium-rate.readrivier lookup validate
POST/lookup/numbersLook a number up: validity and country are free; line type, carrier, caller name, reachability, SIM swap and pumping risk ask the carrier and use the plan's lookups allowance. Recent answers are reused (cached: true) and cost nothing.writerivier lookup number
GET/lookup/numbersLookups already made, newest first; filter by number.readrivier lookup list

call settings

MethodRouteWhat it doesLevelCommand
GET/calls/settingsVoice settings: numbers calls may be placed from, recording (off by default), allowed and refused countries, hourly limit, longest call, quiet hours for marketing calls.readrivier calls settings
PUT/calls/settingsChange the voice settings. Recording cannot be turned on until the project confirms its counsel has read the recording rules.writerivier calls settings-set

call flow

MethodRouteWhat it doesLevelCommand
GET/calls/flowsCall flows: what a line does when a call is answered, as data (say, play, pause, ask for a key or a word, transfer, record with consent, hang up). Each carries the address to give a number so it answers with the flow.readrivier calls flows
GET/calls/flows/{id}One call flow with its nodes and steps.readrivier calls flow
POST/calls/flowsCreate a call flow. It is checked in full first: every node a step names must exist, numbers must be valid, audio must be a public https address, and a recording step must say the call is recorded.writerivier calls flow-create
PUT/calls/flows/{id}Change a call flow's name or steps.writerivier calls flow-update
DELETE/calls/flows/{id}Delete a call flow.writerivier calls flow-delete

call flow check

MethodRouteWhat it doesLevelCommand
POST/calls/flows/checkCheck a flow without storing it: the problems that stop it, and notes (a language the voice cannot speak yet).writerivier calls flow-check

call flow simulate

MethodRouteWhat it doesLevelCommand
POST/calls/flows/simulateWalk a call flow without placing a call: give the flow and what the caller presses or says at each question, and get back what the line would say and do, and the question it waits at next. Uses the same checks and routing as a real call.writerivier calls flow-simulate

call flow template

MethodRouteWhat it doesLevelCommand
GET/calls/flows/templatesReady-made call flows to start from: a greeting with a menu, voicemail, and forwarding during opening hours. Each is a complete flow to adjust and save.readrivier calls flow-templates

call

MethodRouteWhat it doesLevelCommand
POST/callsPlace a phone call that runs a call flow when answered. Refused, with the reason, for an invalid or premium-rate number, a refused country, a number the project may not call from, an opted-out person (marketing), quiet hours (marketing), the hourly limit, or an exhausted plan allowance. Minutes are charged when the call ends.writerivier calls place
GET/callsThe call log, newest first, with status and length: filter by status, direction, a party's number or flow.readrivier calls list
GET/calls/{id}One call: status, who, how long, minutes charged, what the caller pressed or said, every status change, recordings.readrivier calls get
POST/calls/{id}/hangupEnd a call that is ringing or in progress.writerivier calls hangup

call recording

MethodRouteWhat it doesLevelCommand
GET/calls/recordingsRecordings kept, with the call, length, how consent was given and the day each is deleted.readrivier calls recordings
DELETE/calls/recordings/{rid}Delete a recording at the supplier and from the log.writerivier calls recording-delete