Phone and messaging
Numbers, calls, call flows, text messages, WhatsApp and verification.
Scopes for this area: voice:read, voice:write and voice:admin.
65 operations
number
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /numbers | The project's phone numbers. | read | rivier voice number list |
| GET | /numbers/search | Numbers available to buy. | read | rivier voice number search |
| POST | /numbers | Buy a number at Praecise Inbox for the project owner's account and use it here; refused while Inbox has not opened buying. | write | rivier voice number buy |
| GET | /numbers/given | The numbers the owner's account gave Rivier at Praecise Inbox that this project does not use yet, and where more are given. | read | rivier voice number given |
| POST | /numbers/{id}/use | Use here a number the owner's account gave Rivier at Praecise Inbox. | write | rivier voice number use |
| POST | /numbers/{id}/drop | Stop using a number here; it stays the account's at Praecise Inbox. | write | rivier voice number drop |
| GET | /numbers/{id} | One number with its agents. | read | rivier voice number get |
| PATCH | /numbers/{id} | Change a number's settings. | write | rivier voice number update |
| POST | /numbers/{id}/release | Give back a number Rivier bought at Praecise Inbox. | write | rivier voice number release |
| GET | /numbers/{id}/agents | The agents that answer a number. | read | rivier voice number agents |
| PUT | /numbers/{id}/agents/{agentId} | Let an agent answer a number. | write | rivier voice number add agent |
| DELETE | /numbers/{id}/agents/{agentId} | Stop an agent answering a number. | write | rivier voice number remove agent |
catalogue
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /voice/catalogue | The voices on offer. | read | rivier voice catalogue list |
| POST | /voice/catalogue/refresh | Refresh the voice list from the provider. | write | rivier voice catalogue refresh |
| PUT | /voice/catalogue/{voice}/preview | Store a preview clip for a voice. | write | rivier voice catalogue preview |
profile
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /voice/project | The project's voice profile. | read | rivier voice profile project |
| POST | /voice/project | Propose the project's voice profile. | write | rivier voice profile propose project |
| POST | /voice/profiles/{id}/submit | Send a voice profile for approval. | write | rivier voice profile submit |
| POST | /voice/profiles/{id}/approve | Approve a voice profile. | write | rivier voice profile approve |
| POST | /voice/profiles/{id}/reject | Send a voice profile back. | write | rivier voice profile reject |
session
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /voice/sessions | Voice sessions. | read | rivier voice session list |
| GET | /voice/sessions/{id} | One voice session. | read | rivier voice session get |
| GET | /voice/sessions/{id}/transcript | The transcript of a session. | read | rivier voice session transcript |
| POST | /voice/sessions/{id}/end | End a session. | write | rivier voice session end |
| POST | /voice/sessions/{id}/transfer | Hand a session to a person. | write | rivier voice session transfer |
live
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /voice/live/sessions | A single-use token for a browser to talk to an agent in real time on a chat site: bound to the agent, the site and the page's origin, valid for one minute. | write | rivier voice live start |
| POST | /voice/live/sessions/{id}/extend | Give a live browser conversation more minutes, up to the agent's profile maximum. | write | rivier voice live extend |
platform session
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /voice/platform/sessions | A real-time voice session your platform configures with no agent: converse on your own instruction, interpret between two languages, or only transcribe; a live route, a catalogue voice, tools answered in the browser or posted signed to your server, your own metadata. Answers a single-use token bound to that configuration and one page origin, valid one minute; the same idempotency key answers the same session until it starts. | write | rivier voice platform session start |
| GET | /voice/platform/sessions/{id} | A platform voice session: its state, seconds, minutes, cost, why it ended, and the words when they were kept. | read | rivier voice platform session get |
| POST | /voice/platform/sessions/{id}/extend | More minutes for a running platform session, refused when the plan cannot hold them now. | write | rivier voice platform session extend |
| POST | /voice/platform/sessions/{id}/end | End a running platform session. | write | rivier voice platform session end |
| POST | /voice/platform/sessions/erase | Erase the kept words of one platform session, or of every session whose metadata has the given values. The figures stay. | write | rivier voice platform session erase |
| GET | /voice/platform/languages | What each live route takes and says, for speech in, speech out and interpreting, and the date that was read from the supplier. | read | rivier voice platform session languages |
phone status
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /phone/status | Whether the phone account is live, in test mode or a mock, and the addresses the carrier calls back on. | read | rivier voice phone status get |
phone message
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /phone/messages | Send 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. | write | rivier voice phone message send |
| GET | /phone/messages | Recent texts and WhatsApp messages, both ways, with where each one stands. | read | rivier voice phone message list |
| GET | /phone/messages/{id} | One message and where it stands. | read | rivier voice phone message get |
phone conversation
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /phone/conversations | Conversations by person, newest first, with the ones waiting for an answer marked. | read | rivier 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. | read | rivier voice phone conversation get |
phone contact
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /phone/opt-in | Record how and where a person agreed to receive messages. Needed before marketing and before a WhatsApp template to someone who has not written first. | write | rivier voice phone contact opt in |
| POST | /phone/opt-out | Record that a person does not want messages. They stay off the list until they opt back in. | write | rivier voice phone contact opt out |
| DELETE | /phone/people/{peer} | Remove every message and agreement record held for one phone number. | write | rivier voice phone contact erase |
phone sender
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /phone/senders | Everything the project can send from: its numbers, sender names and WhatsApp numbers, and which are ready. | read | rivier voice phone sender list |
| POST | /phone/senders | Add a sender name or a WhatsApp number. A name that a country wants registered waits until the registration is approved. | write | rivier voice phone sender add |
| DELETE | /phone/senders/{id} | Remove a sender name or WhatsApp number. | write | rivier voice phone sender remove |
phone template
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /phone/templates | WhatsApp message templates and whether WhatsApp has approved each. | read | rivier voice phone template list |
| POST | /phone/templates | Write a WhatsApp template. Placeholders are {{1}}, {{2}}. It cannot be sent until WhatsApp approves it. | write | rivier voice phone template create |
| POST | /phone/templates/{id}/submit | Send a template to WhatsApp for approval. | write | rivier voice phone template submit |
| POST | /phone/templates/{id}/refresh | Ask WhatsApp where a template's approval stands. | write | rivier voice phone template refresh |
| DELETE | /phone/templates/{id} | Delete a template. | write | rivier voice phone template delete |
verify service
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /verify/services | The 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). | read | rivier verify services |
| GET | /verify/services/{id} | One verification service with all its settings. | read | rivier verify service |
| POST | /verify/services | Create 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. | write | rivier verify service-create |
| PUT | /verify/services/{id} | Change a verification service. Existing verifications keep running under the rules they started with. | write | rivier verify service-update |
| DELETE | /verify/services/{id} | Delete a verification service and its verifications. | write | rivier verify service-delete |
verify funnel
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /verify/services/{id}/funnel | How 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. | read | rivier verify funnel |
verify start
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /verify/services/{id}/verifications | Send 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). | write | rivier verify start |
verify check
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| POST | /verify/services/{id}/check | Check 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. | write | rivier verify check |
verify attempt
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /verify/verifications | Verifications, newest first: filter by service, status, channel, destination or time. Each shows its send attempts by channel. | read | rivier verify list |
| GET | /verify/verifications/{vid} | One verification with its status, attempts per channel and why a channel failed. | read | rivier verify get |
| POST | /verify/verifications/{vid}/cancel | Cancel a pending verification: its code stops working. | write | rivier verify cancel |
| POST | /verify/verifications/{vid}/fallback | Send the code through another channel (the next one in the service's order, or the one named) when the person did not receive it. | write | rivier verify fallback |
lookup number
| Method | Route | What it does | Level | Command |
|---|---|---|---|---|
| GET | /lookup/validate | Check 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. | read | rivier lookup validate |
| POST | /lookup/numbers | Look 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. | write | rivier lookup number |
| GET | /lookup/numbers | Lookups already made, newest first; filter by number. | read | rivier lookup list |