mv.calls
Inbound and outbound calls, their artefacts and live call control. These methods are on mv.calls, where mv is your client (see the Node.js SDK). Each one returns the response object and throws when the API answers with an error.
addParticipant()
Section titled “addParticipant()”Add a participant. Calls handled by a human agent: rings a phone number or an agent into the call (a conference of up to 8), or adds an AI assistant. The participant starts ringing; follow it in GET …/control.
mv.calls.addParticipant(id: CallsAddParticipantData["path"]["id"], body: CallsAddParticipantData["body"], options?: RequestOptions): Promise<CallsAddParticipantResponse>POST /calls/{id}/participants · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.to |
object |
yes | Who to add: a phone number, an agent or an AI assistant (queues cannot join a call). |
body.announce |
string |
no | A line said to them when they join. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallParticipantCreated:
| Field | Type | Description |
|---|---|---|
object |
"call_participant" |
Always call_participant. |
call_id |
string |
A call ID (prefix call_). |
participant_id |
string |
— |
name |
string |
— |
state |
"ringing" | "connected" |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callParticipantCreated = await mv.calls.addParticipant("call_7Hk2Lm9Qp", { announce: "Joining you to a customer call", to: { number: "+97235551234", },});console.log(callParticipantCreated);consult()
Section titled “consult()”Complete, merge, swap or cancel a consultation. After a warm transfer: complete hands the customer to the consulted party, merge makes a three-way call, swap alternates between them, cancel returns to the customer.
mv.calls.consult(id: CallsConsultData["path"]["id"], action: CallsConsultData["path"]["action"], body?: CallsConsultData["body"], options?: RequestOptions): Promise<CallsConsultResponse>POST /calls/{id}/consult/{action} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
action |
string |
yes | complete: hand the customer over; merge: a three-way call; swap: alternate; cancel: back to the customer. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.consult("call_7Hk2Lm9Qp", "complete", {});console.log(callControl);create()
Section titled “create()”Create an outbound call. Places an outbound call with an assistant, or with a published voice flow and its assistant. purpose is required: it drives the outbound compliance checks (do-not-call list for every call; recorded consent and the national registry for marketing). The Idempotency-Key header is required, so a retried request never calls anyone twice. Test-mode keys place simulated calls that never reach a phone network.
mv.calls.create(body: CallsCreateData["body"], options?: RequestOptions): Promise<CallsCreateResponse>POST /calls · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
body.to |
string |
yes | The number to call, E.164. |
body.purpose |
"service" | "marketing" | "survey" |
yes | service, marketing or survey. Marketing calls need recorded consent and pass the national do-not-call registry (§30A). |
body.amd |
object |
no | Answering-machine detection (default: the assistant’s setting). |
body.assistant_id |
string |
no | The assistant that handles the call. Pass this or flow_id (or a connect-mode stream). |
body.caller_id |
string |
no | The number to present; it must be allowed on the connection: one of its numbers, or a caller ID you verified (POST /v1/caller_ids, when caller-ID verification is enabled for the organisation). |
body.connection_id |
string |
no | The SIP connection to call out on (default: the organisation’s default connection). |
body.first_message |
string |
no | What the assistant says first on this call, instead of its own first message. At most 500 characters, at most 2,000 once rendered. {{name}} placeholders are filled from variables, and each one must be there (an empty string says nothing). The assistant speaks first; when the call needs an AI disclosure, it is still said before this text. Empty: the assistant’s own first message. Not with flow_id, an assistant that runs a voice flow (the flow’s Start node speaks first) or a connect-mode stream. |
body.flow_id |
string |
no | A published voice flow; it runs on its linked assistant. Pass this or assistant_id. |
body.from_number_id |
string |
no | The phone number to call from (pn_…, GET /v1/phone_numbers): it sets the connection and the caller ID. Or pass connection_id and caller_id. |
body.max_duration_s |
integer |
no | End the call after this many seconds (default: the assistant’s limit). |
body.metadata |
MetadataInput |
no | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
body.stream |
CallStreamParamsInput |
no | A media stream on the new call, in the Twilio Media Streams format: connect hands the call to your bot (the AI disclosure plays first; your bot gets start and the caller’s audio after it), fork copies its audio to your server. |
body.variables |
Record<string, string> |
no | Template variables for the prompt, first message and flow ({{customer_name}}); at most 50. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Call:
| Field | Type | Description |
|---|---|---|
id |
string |
A call ID (prefix call_). |
object |
"call" |
Always call. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
direction |
CallDirection | null |
— |
transport |
"sip" | "webrtc" |
sip for phone calls, webrtc for browser calls, conference rooms and WhatsApp calls. |
channel |
"phone" | "web" | "whatsapp" |
How the call came in or went out: phone (a phone number or SIP trunk), web (a browser call, a conference room, the web widget) or whatsapp (a WhatsApp call: its media is WebRTC, so transport is webrtc). New channels may be added: treat an unknown value as other. |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
from |
string | null |
The calling number (E.164 when it is a phone number) or name. |
to |
string | null |
The called number (E.164 when it is a phone number) or destination. |
assistant_id |
string | null |
asst_… ID. |
flow_id |
string | null |
flow_… ID. |
flow_version |
integer | null |
The flow version that ran (0: an unpublished draft). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
The human agent who handled the call (usr_…). |
campaign_id |
string | null |
cmp_… ID. |
contact_id |
string | null |
ctc_… ID. |
connection_id |
string | null |
conn_… ID. |
api_key_id |
string | null |
The API key that created the call (key_…). |
purpose |
CallPurpose | null |
— |
started_at |
string |
When the call started: dialled out, or rang in. |
answered_at |
string | null |
— |
ended_at |
string | null |
— |
duration_ms |
integer | null |
— |
end_reason |
string | null |
Why the call ended, e.g. customer-ended-call, assistant-ended-call, customer-busy, customer-did-not-answer. |
answered_by |
CallAnsweredBy | null |
— |
disposition |
string | null |
The business outcome recorded on the call (set_outcome tool, or the summary). |
has_recording |
boolean |
— |
ai_generated |
boolean |
Machine-readable marking (EU AI Act Art. 50(2)): true when the call contains speech generated by AI — an AI voice agent, or synthetic-voice IVR prompts. Recordings of such calls carry the same tag in their file metadata. |
ai_segments |
CallAiSegment[] |
When AI-generated speech was played, in ms from the start of the call (empty when ai_generated is false). |
recording_announced |
boolean |
The caller heard, in full, that the call is recorded: the recording notice of a call with agents, or an AI disclosure that includes it. false when no such notice played (or played only in part). Calls made before these facts were recorded say false. |
recording_announced_at |
string | null |
When the recording notice finished playing; null when recording_announced is false. |
ai_disclosure_played |
boolean |
The caller heard, in full, that they are speaking with an AI (the AI disclosure). false when none played, or the caller left before it ended. Calls made before these facts were recorded say false. |
ai_disclosure_played_at |
string | null |
When the AI disclosure finished playing; null when ai_disclosure_played is false. |
consent_basis |
CallConsentBasis | null |
PROVISIONAL (values pending legal review): the basis on record for recording the call and processing what was said; null when there is none on record. Gate recording-based processing (for example AI analysis of the transcript) on a basis you accept. |
summary |
CallSummary | null |
— |
cost |
CallCost | null |
Set once the call has ended (never null then); null while it is in progress. |
variables |
Record<string, string> |
The variables the call was created with. |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
whatsapp |
CallWhatsApp | null |
A WhatsApp call’s ids (channel whatsapp); null for every other call. Its metadata carries the labels the messaging platform relayed with the call. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
assistant_version |
string | null |
The version of the assistant’s settings the call ran with (everything but its name and metadata). Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
prompt_version |
string | null |
The version of what the assistant was told to say: its system prompt, first, idle and end-of-call messages, and the flow and flow version. Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const call = await mv.calls.create({ assistant_id: "asst_4Gk2LmN9pQ4rS6tV8wX0yZ", from_number_id: "pn_4Gk2LmN9pQ4rS6tV8wX0yZ", metadata: { crm_contact_id: "0031x00000AbCdE", }, purpose: "service", to: "+972501234567", variables: { customer_name: "Dana", },});console.log(call);createStream()
Section titled “createStream()”Stream a call’s audio to your WebSocket. Starts a media stream on a live call in fork mode: a one-way copy of the caller (inbound), what the caller hears (outbound), or both, sent to your wss:// URL as Twilio Media Streams messages (connected, start, media, stop). The call goes on exactly as before: if your server is slow, frames older than 2 s are dropped (frames_dropped); if it disconnects, the stream reconnects (3 tries) and otherwise gives up (failed) without touching the call. The upgrade request is signed with your signing secret over its path and query (webhook-id is the stream’s ID). The stream stops when the call ends or with DELETE. At most 2 streams per call.
mv.calls.createStream(id: CallsCreateStreamData["path"]["id"], body: CallsCreateStreamData["body"], options?: RequestOptions): Promise<CallsCreateStreamResponse>POST /calls/{id}/streams · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.url |
string |
yes | Your WebSocket URL (wss://). The upgrade is signed with your signing secret (webhook-id, webhook-timestamp, webhook-signature over the path and query). |
body.custom_parameters |
Record<string, string> |
no | Up to 20 string key/values the receiver gets in start.customParameters (as Twilio’s stream parameters). |
body.format |
"mulaw_8000" | "l16_16000" | "l16_8000" |
no | mulaw_8000 (the default): G.711 μ-law at 8 kHz, Twilio’s; l16_16000 / l16_8000: signed 16-bit PCM, little-endian. |
body.mode |
"fork" |
no | fork (the default): a one-way copy; your server’s messages are ignored. |
body.tracks |
"inbound" | "outbound" | "both" |
no | inbound: the caller; outbound: what the caller hears (the assistant, an agent, prompts); both (the default). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”MediaStream:
| Field | Type | Description |
|---|---|---|
id |
string |
The stream’s ID (ms_…): streamSid in the protocol’s messages. |
object |
"media_stream" |
Always media_stream. |
livemode |
boolean |
true in live mode, false in test mode. |
call_id |
string |
The call whose audio is streamed. |
mode |
"fork" |
fork: a one-way copy of the call’s audio; the call goes on as before. |
url |
string |
The receiver’s WebSocket URL. |
tracks |
"inbound" | "outbound" | "both" |
inbound: the caller; outbound: what the caller hears (the assistant, an agent, prompts); both. |
format |
"mulaw_8000" | "l16_16000" | "l16_8000" |
mulaw_8000: G.711 μ-law at 8 kHz (Twilio’s); l16_16000 / l16_8000: signed 16-bit PCM, little-endian. |
custom_parameters |
Record<string, string> |
— |
status |
"connecting" | "streaming" | "reconnecting" | "stopped" | "failed" |
connecting (and reconnecting after the receiver dropped), streaming, stopped, or failed (the receiver could not be reached; the call went on). |
frames_sent |
integer |
20 ms frames sent so far (all tracks). |
frames_dropped |
integer |
Frames dropped because the receiver did not keep up (at most 2 s of audio waits per track). |
ended_reason |
string | null |
Why it ended: call_ended, stopped, receiver_closed or connect_failed; null while it runs. |
created |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const mediaStream = await mv.calls.createStream("call_7Hk2Lm9Qp", { custom_parameters: { crm_id: "42", }, format: "mulaw_8000", tracks: "both", url: "wss://media.example.com/streams",});console.log(mediaStream);createSummary()
Section titled “createSummary()”Summarise a call again. Writes a new AI summary from the transcript and returns it (it replaces the stored one). Send an Idempotency-Key: a retry then returns the same summary instead of writing another.
mv.calls.createSummary(id: CallsCreateSummaryData["path"]["id"], body?: CallsCreateSummaryData["body"], options?: RequestOptions): Promise<CallsCreateSummaryResponse>POST /calls/{id}/summary · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallSummary:
| Field | Type | Description |
|---|---|---|
object |
"call_summary" |
Always call_summary. |
call_id |
string |
A call ID (prefix call_). |
text |
string |
A two-to-four sentence summary, in the language of the call. |
intent |
string |
What the caller wanted. |
outcome |
string |
How the call ended, or what was agreed. |
sentiment |
"positive" | "neutral" | "negative" | "mixed" |
— |
key_points |
string[] |
— |
action_items |
string[] |
Follow-ups for your business; empty when there are none. |
generated_at |
string | null |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callSummary = await mv.calls.createSummary("call_7Hk2Lm9Qp", {});console.log(callSummary);delete()
Section titled “delete()”Delete a call. Deletes an ended call with its transcript, events and recording. A call in progress answers 409 call_in_progress: hang it up first.
mv.calls.delete(id: CallsDeleteData["path"]["id"], options?: RequestOptions): Promise<CallsDeleteResponse>DELETE /calls/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallDeleted:
| Field | Type | Description |
|---|---|---|
id |
string |
A call ID (prefix call_). |
object |
"call" |
Always call. |
deleted |
true |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callDeleted = await mv.calls.delete("call_7Hk2Lm9Qp");console.log(callDeleted);deleteStream()
Section titled “deleteStream()”Stop a media stream. Stops the stream: what is queued is flushed, your server gets stop, and the socket closes. The call is not affected. Streams also stop on their own when the call ends.
mv.calls.deleteStream(id: CallsDeleteStreamData["path"]["id"], streamId: CallsDeleteStreamData["path"]["stream_id"], options?: RequestOptions): Promise<CallsDeleteStreamResponse>DELETE /calls/{id}/streams/{stream_id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
stream_id |
string |
yes | The stream’s ID (ms_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”MediaStream:
| Field | Type | Description |
|---|---|---|
id |
string |
The stream’s ID (ms_…): streamSid in the protocol’s messages. |
object |
"media_stream" |
Always media_stream. |
livemode |
boolean |
true in live mode, false in test mode. |
call_id |
string |
The call whose audio is streamed. |
mode |
"fork" |
fork: a one-way copy of the call’s audio; the call goes on as before. |
url |
string |
The receiver’s WebSocket URL. |
tracks |
"inbound" | "outbound" | "both" |
inbound: the caller; outbound: what the caller hears (the assistant, an agent, prompts); both. |
format |
"mulaw_8000" | "l16_16000" | "l16_8000" |
mulaw_8000: G.711 μ-law at 8 kHz (Twilio’s); l16_16000 / l16_8000: signed 16-bit PCM, little-endian. |
custom_parameters |
Record<string, string> |
— |
status |
"connecting" | "streaming" | "reconnecting" | "stopped" | "failed" |
connecting (and reconnecting after the receiver dropped), streaming, stopped, or failed (the receiver could not be reached; the call went on). |
frames_sent |
integer |
20 ms frames sent so far (all tracks). |
frames_dropped |
integer |
Frames dropped because the receiver did not keep up (at most 2 s of audio waits per track). |
ended_reason |
string | null |
Why it ended: call_ended, stopped, receiver_closed or connect_failed; null while it runs. |
created |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const mediaStream = await mv.calls.deleteStream("call_7Hk2Lm9Qp", "ms_4fG7hJ2kL9mN3pQ6rS8tUv");console.log(mediaStream);downloadRecording()
Section titled “downloadRecording()”Download a recording (signed link). The URL a recording link points at. No API key: the token is the credential, valid for one call for 15 minutes. Supports Range requests.
mv.calls.downloadRecording(token: CallsDownloadRecordingData["path"]["token"], options?: RequestOptions): Promise<CallsDownloadRecordingResponse>GET /recordings/{token} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
token |
string |
yes | The signed token of a recording link. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Nothing, on success.
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const data = await mv.calls.downloadRecording("token_123");console.log(data);endSupervision()
Section titled “endSupervision()”End a supervision. The supervisor leaves the call now: the audio stops, the agent stops seeing them, and the browser’s socket closes. Answers the ended supervision (also when it had already ended).
mv.calls.endSupervision(id: CallsEndSupervisionData["path"]["id"], supervisionId: CallsEndSupervisionData["path"]["supervision_id"], options?: RequestOptions): Promise<CallsEndSupervisionResponse>DELETE /calls/{id}/supervise/{supervision_id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
supervision_id |
string |
yes | A supervision ID (sup_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Supervision:
| Field | Type | Description |
|---|---|---|
id |
string |
The supervision’s ID. |
object |
"supervision" |
Always supervision. |
livemode |
boolean |
true in live mode, false in test mode. |
call_id |
string |
The call being supervised. |
mode |
"listen" | "whisper" | "barge" |
listen: the supervisor hears both sides and nobody hears them. whisper: the agent hears the supervisor, the customer never does. barge: the supervisor joins the conversation and both hear them. |
status |
"pending" | "active" | "reconnecting" | "ended" |
pending: the browser has not joined yet. active: the supervisor is on the call. reconnecting: the browser’s connection dropped; it rejoins in the same mode by itself (the supervision ends if it is not back within 30 seconds). ended: see end_reason. |
supervisor |
object |
Who supervises. |
created |
string |
An ISO-8601 timestamp in UTC. |
started_at |
string | null |
When the supervisor first joined the call. |
ended_at |
string | null |
— |
end_reason |
"api" | "left" | "call_ended" | "disconnected" | "not_connected" | "agent_session_ended" | null |
Why it ended: api (DELETE), left (the browser left), call_ended, disconnected (the browser did not come back within 30 seconds), not_connected (nobody joined before the token expired), agent_session_ended. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const supervision = await mv.calls.endSupervision("call_7Hk2Lm9Qp", "sup_7Hk2Lm9Qp");console.log(supervision);hangup()
Section titled “hangup()”Hang up a call. Ends a live call for everyone on it (while it rings, cancels it) and returns the call. An ended call answers 409 call_not_active.
mv.calls.hangup(id: CallsHangupData["path"]["id"], body?: CallsHangupData["body"], options?: RequestOptions): Promise<CallsHangupResponse>POST /calls/{id}/hangup · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Call:
| Field | Type | Description |
|---|---|---|
id |
string |
A call ID (prefix call_). |
object |
"call" |
Always call. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
direction |
CallDirection | null |
— |
transport |
"sip" | "webrtc" |
sip for phone calls, webrtc for browser calls, conference rooms and WhatsApp calls. |
channel |
"phone" | "web" | "whatsapp" |
How the call came in or went out: phone (a phone number or SIP trunk), web (a browser call, a conference room, the web widget) or whatsapp (a WhatsApp call: its media is WebRTC, so transport is webrtc). New channels may be added: treat an unknown value as other. |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
from |
string | null |
The calling number (E.164 when it is a phone number) or name. |
to |
string | null |
The called number (E.164 when it is a phone number) or destination. |
assistant_id |
string | null |
asst_… ID. |
flow_id |
string | null |
flow_… ID. |
flow_version |
integer | null |
The flow version that ran (0: an unpublished draft). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
The human agent who handled the call (usr_…). |
campaign_id |
string | null |
cmp_… ID. |
contact_id |
string | null |
ctc_… ID. |
connection_id |
string | null |
conn_… ID. |
api_key_id |
string | null |
The API key that created the call (key_…). |
purpose |
CallPurpose | null |
— |
started_at |
string |
When the call started: dialled out, or rang in. |
answered_at |
string | null |
— |
ended_at |
string | null |
— |
duration_ms |
integer | null |
— |
end_reason |
string | null |
Why the call ended, e.g. customer-ended-call, assistant-ended-call, customer-busy, customer-did-not-answer. |
answered_by |
CallAnsweredBy | null |
— |
disposition |
string | null |
The business outcome recorded on the call (set_outcome tool, or the summary). |
has_recording |
boolean |
— |
ai_generated |
boolean |
Machine-readable marking (EU AI Act Art. 50(2)): true when the call contains speech generated by AI — an AI voice agent, or synthetic-voice IVR prompts. Recordings of such calls carry the same tag in their file metadata. |
ai_segments |
CallAiSegment[] |
When AI-generated speech was played, in ms from the start of the call (empty when ai_generated is false). |
recording_announced |
boolean |
The caller heard, in full, that the call is recorded: the recording notice of a call with agents, or an AI disclosure that includes it. false when no such notice played (or played only in part). Calls made before these facts were recorded say false. |
recording_announced_at |
string | null |
When the recording notice finished playing; null when recording_announced is false. |
ai_disclosure_played |
boolean |
The caller heard, in full, that they are speaking with an AI (the AI disclosure). false when none played, or the caller left before it ended. Calls made before these facts were recorded say false. |
ai_disclosure_played_at |
string | null |
When the AI disclosure finished playing; null when ai_disclosure_played is false. |
consent_basis |
CallConsentBasis | null |
PROVISIONAL (values pending legal review): the basis on record for recording the call and processing what was said; null when there is none on record. Gate recording-based processing (for example AI analysis of the transcript) on a basis you accept. |
summary |
CallSummary | null |
— |
cost |
CallCost | null |
Set once the call has ended (never null then); null while it is in progress. |
variables |
Record<string, string> |
The variables the call was created with. |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
whatsapp |
CallWhatsApp | null |
A WhatsApp call’s ids (channel whatsapp); null for every other call. Its metadata carries the labels the messaging platform relayed with the call. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
assistant_version |
string | null |
The version of the assistant’s settings the call ran with (everything but its name and metadata). Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
prompt_version |
string | null |
The version of what the assistant was told to say: its system prompt, first, idle and end-of-call messages, and the flow and flow version. Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const call = await mv.calls.hangup("call_7Hk2Lm9Qp", {});console.log(call);hold()
Section titled “hold()”Put a call on hold or take it off hold. Calls handled by a human agent: the customer hears the hold music while on is true.
mv.calls.hold(id: CallsHoldData["path"]["id"], body?: CallsHoldData["body"], options?: RequestOptions): Promise<CallsHoldResponse>POST /calls/{id}/hold · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.on |
boolean |
no | true: put the customer on hold; false: take them off hold. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.hold("call_7Hk2Lm9Qp", { on: true,});console.log(callControl);list()
Section titled “list()”List calls. The organisation’s calls, newest first. Test-mode keys see only test calls. Filter by status, direction, type, assistant, campaign, agent, number or start time (created[gte], created[lt]…).
mv.calls.list(query?: NonNullable<CallsListData["query"]>, options?: RequestOptions): PagedList<CallsListResponse["data"][number], NonNullable<CallsListData["query"]>>GET /calls · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
query.limit |
integer |
no | How many objects to return, 1–100 (default 20). |
query.starting_after |
string |
no | A cursor (next_cursor) or object ID: return the objects after it (older). |
query.ending_before |
string |
no | A cursor or object ID: return the objects before it (newer). |
query.status |
string |
no | in_progress: calls that have not ended (queued, ringing or answered). ended: finished calls. |
query.direction |
string |
no | |
query.type |
string |
no | |
query.channel |
string |
no | Only calls of this channel (whatsapp: WhatsApp calls). |
query.assistant_id |
string |
no | A assistant ID (asst_…). |
query.campaign_id |
string |
no | A campaign ID (cmp_…). |
query.agent_id |
string |
no | A user ID (usr_…). |
query.from |
string |
no | Calls from this number, exactly as recorded on the call. |
query.to |
string |
no | Calls to this number, exactly as recorded on the call. |
query.created |
object |
no | Filter on started_at: created[gte], created[gt], created[lte], created[lt] (ISO-8601). |
query.expand |
array |
no | Fields to expand into objects, e.g. expand[]=assistant. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”A PagedList: await it for the first page, for await it for every item.
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
for await (const call of mv.calls.list()) { console.log(call);}listCopilotEvents()
Section titled “listCopilotEvents()”List a call’s copilot events. What the real-time agent copilot showed on the call and what the agent did with it (cards used or dismissed, searches), newest first.
mv.calls.listCopilotEvents(id: CallsListCopilotEventsData["path"]["id"], query?: NonNullable<CallsListCopilotEventsData["query"]>, options?: RequestOptions): PagedList<CallsListCopilotEventsResponse["data"][number], NonNullable<CallsListCopilotEventsData["query"]>>GET /calls/{id}/copilot_events · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
query.limit |
integer |
no | How many objects to return, 1–100 (default 20). |
query.starting_after |
string |
no | A cursor (next_cursor) or object ID: return the objects after it (older). |
query.ending_before |
string |
no | A cursor or object ID: return the objects before it (newer). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”A PagedList: await it for the first page, for await it for every item.
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
for await (const call of mv.calls.listCopilotEvents("call_7Hk2Lm9Qp")) { console.log(call);}Pause or resume recording for a card payment. PCI DSS scope reduction: while paused the call is neither recorded nor transcribed, live listeners hear silence and keypad digits are logged masked; with DTMF masking on, keypad tones are removed for everyone except the payment line. Pausing a paused call (or resuming a running one) is a 409. Needs the organisation’s PCI mode.
mv.calls.pci(id: CallsPciData["path"]["id"], body: CallsPciData["body"], options?: RequestOptions): Promise<CallsPciResponse>POST /calls/{id}/pci · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.action |
"pause" | "resume" |
yes | pause: stop recording and transcription for a card payment; resume: start them again. |
body.destination_participant_id |
string |
no | Human-handled calls: the participant (a payment IVR or keypad-capture line you added) that receives the caller’s keys. |
body.max_seconds |
integer |
no | Resume by itself after this long (capped by the organisation’s maximum, which is also the default). |
body.reason |
string |
no | Shown in the call log (default payment). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallPci:
| Field | Type | Description |
|---|---|---|
object |
"call_pci" |
Always call_pci. |
call_id |
string |
A call ID (prefix call_). |
paused |
boolean |
Recording and transcription are paused for a payment. |
reason |
string | null |
Why (e.g. payment), while paused. |
paused_at |
string | null |
— |
resumes_at |
string | null |
When the pause ends by itself unless resumed earlier. |
destination_participant_id |
string | null |
The participant the pause named as the payment line, if any (otherwise a participant on one of the organisation’s payment numbers). |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callPci = await mv.calls.pci("call_7Hk2Lm9Qp", { action: "pause", max_seconds: 180, reason: "payment",});console.log(callPci);removeParticipant()
Section titled “removeParticipant()”Remove a participant. Drops a participant from the call. The customer (client) cannot be removed: hang up instead.
mv.calls.removeParticipant(id: CallsRemoveParticipantData["path"]["id"], participantId: CallsRemoveParticipantData["path"]["participant_id"], options?: RequestOptions): Promise<CallsRemoveParticipantResponse>DELETE /calls/{id}/participants/{participant_id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
participant_id |
string |
yes | A participant_id from the call’s control state. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.removeParticipant("call_7Hk2Lm9Qp", "participant_id_123");console.log(callControl);retrieve()
Section titled “retrieve()”Retrieve a call. A call, live or ended. While it runs, status and answered_at come from the live call.
mv.calls.retrieve(id: CallsRetrieveData["path"]["id"], query?: NonNullable<CallsRetrieveData["query"]>, options?: RequestOptions): Promise<CallsRetrieveResponse>GET /calls/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
query.expand |
array |
no | Fields to expand into objects, e.g. expand[]=assistant. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Call:
| Field | Type | Description |
|---|---|---|
id |
string |
A call ID (prefix call_). |
object |
"call" |
Always call. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
direction |
CallDirection | null |
— |
transport |
"sip" | "webrtc" |
sip for phone calls, webrtc for browser calls, conference rooms and WhatsApp calls. |
channel |
"phone" | "web" | "whatsapp" |
How the call came in or went out: phone (a phone number or SIP trunk), web (a browser call, a conference room, the web widget) or whatsapp (a WhatsApp call: its media is WebRTC, so transport is webrtc). New channels may be added: treat an unknown value as other. |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
from |
string | null |
The calling number (E.164 when it is a phone number) or name. |
to |
string | null |
The called number (E.164 when it is a phone number) or destination. |
assistant_id |
string | null |
asst_… ID. |
flow_id |
string | null |
flow_… ID. |
flow_version |
integer | null |
The flow version that ran (0: an unpublished draft). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
The human agent who handled the call (usr_…). |
campaign_id |
string | null |
cmp_… ID. |
contact_id |
string | null |
ctc_… ID. |
connection_id |
string | null |
conn_… ID. |
api_key_id |
string | null |
The API key that created the call (key_…). |
purpose |
CallPurpose | null |
— |
started_at |
string |
When the call started: dialled out, or rang in. |
answered_at |
string | null |
— |
ended_at |
string | null |
— |
duration_ms |
integer | null |
— |
end_reason |
string | null |
Why the call ended, e.g. customer-ended-call, assistant-ended-call, customer-busy, customer-did-not-answer. |
answered_by |
CallAnsweredBy | null |
— |
disposition |
string | null |
The business outcome recorded on the call (set_outcome tool, or the summary). |
has_recording |
boolean |
— |
ai_generated |
boolean |
Machine-readable marking (EU AI Act Art. 50(2)): true when the call contains speech generated by AI — an AI voice agent, or synthetic-voice IVR prompts. Recordings of such calls carry the same tag in their file metadata. |
ai_segments |
CallAiSegment[] |
When AI-generated speech was played, in ms from the start of the call (empty when ai_generated is false). |
recording_announced |
boolean |
The caller heard, in full, that the call is recorded: the recording notice of a call with agents, or an AI disclosure that includes it. false when no such notice played (or played only in part). Calls made before these facts were recorded say false. |
recording_announced_at |
string | null |
When the recording notice finished playing; null when recording_announced is false. |
ai_disclosure_played |
boolean |
The caller heard, in full, that they are speaking with an AI (the AI disclosure). false when none played, or the caller left before it ended. Calls made before these facts were recorded say false. |
ai_disclosure_played_at |
string | null |
When the AI disclosure finished playing; null when ai_disclosure_played is false. |
consent_basis |
CallConsentBasis | null |
PROVISIONAL (values pending legal review): the basis on record for recording the call and processing what was said; null when there is none on record. Gate recording-based processing (for example AI analysis of the transcript) on a basis you accept. |
summary |
CallSummary | null |
— |
cost |
CallCost | null |
Set once the call has ended (never null then); null while it is in progress. |
variables |
Record<string, string> |
The variables the call was created with. |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
whatsapp |
CallWhatsApp | null |
A WhatsApp call’s ids (channel whatsapp); null for every other call. Its metadata carries the labels the messaging platform relayed with the call. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
assistant_version |
string | null |
The version of the assistant’s settings the call ran with (everything but its name and metadata). Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
prompt_version |
string | null |
The version of what the assistant was told to say: its system prompt, first, idle and end-of-call messages, and the flow and flow version. Opaque (16 hex characters): equal values mean the same settings, a new value means they changed. With turn tracing on; null for a call no assistant or flow ran. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const call = await mv.calls.retrieve("call_7Hk2Lm9Qp");console.log(call);retrieveControl()
Section titled “retrieveControl()”Retrieve a call’s control state. Who is on the call, hold and consultation state. Ended calls answer status ended with no one connected.
mv.calls.retrieveControl(id: CallsRetrieveControlData["path"]["id"], options?: RequestOptions): Promise<CallsRetrieveControlResponse>GET /calls/{id}/control · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.retrieveControl("call_7Hk2Lm9Qp");console.log(callControl);retrieveFlowPath()
Section titled “retrieveFlowPath()”Retrieve a call’s flow path. The flow nodes the call went through, in order, with the edge taken into each. Calls without a flow answer flow_id: null and no steps.
mv.calls.retrieveFlowPath(id: CallsRetrieveFlowPathData["path"]["id"], options?: RequestOptions): Promise<CallsRetrieveFlowPathResponse>GET /calls/{id}/flow_path · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”FlowPath:
| Field | Type | Description |
|---|---|---|
object |
"flow_path" |
Always flow_path. |
call_id |
string |
A call ID (prefix call_). |
flow_id |
string | null |
null when no flow ran on the call. |
flow_version |
integer | null |
— |
steps |
FlowPathStep[] |
— |
end |
string | null |
How the flow ended (an end node, a transfer, a hang-up). |
transferred |
object | null |
— |
live |
boolean |
The call is still running: more steps may follow. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const flowPath = await mv.calls.retrieveFlowPath("call_7Hk2Lm9Qp");console.log(flowPath);retrievePci()
Section titled “retrievePci()”Retrieve a call’s payment pause. Returns the CallPci object. Answers 404 with the code resource_missing when nothing has this ID in this organisation and mode.
mv.calls.retrievePci(id: CallsRetrievePciData["path"]["id"], options?: RequestOptions): Promise<CallsRetrievePciResponse>GET /calls/{id}/pci · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallPci:
| Field | Type | Description |
|---|---|---|
object |
"call_pci" |
Always call_pci. |
call_id |
string |
A call ID (prefix call_). |
paused |
boolean |
Recording and transcription are paused for a payment. |
reason |
string | null |
Why (e.g. payment), while paused. |
paused_at |
string | null |
— |
resumes_at |
string | null |
When the pause ends by itself unless resumed earlier. |
destination_participant_id |
string | null |
The participant the pause named as the payment line, if any (otherwise a participant on one of the organisation’s payment numbers). |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callPci = await mv.calls.retrievePci("call_7Hk2Lm9Qp");console.log(callPci);retrieveRecording()
Section titled “retrieveRecording()”Retrieve a call’s recording. Redirects (302) to a signed URL that streams the recording for 15 minutes, with no API key. With format=json, answers that URL as a recording_link object instead. The recording is stereo: the customer on the left channel, the assistant or agent on the right.
mv.calls.retrieveRecording(id: CallsRetrieveRecordingData["path"]["id"], query?: NonNullable<CallsRetrieveRecordingData["query"]>, options?: RequestOptions): Promise<CallsRetrieveRecordingResponse>GET /calls/{id}/recording · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
query.format |
string |
no | redirect (default): 302 to the signed URL. json: the signed URL as a recording_link object. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”RecordingLink:
| Field | Type | Description |
|---|---|---|
object |
"recording_link" |
Always recording_link. |
call_id |
string |
A call ID (prefix call_). |
url |
string |
A signed URL that streams the audio without an API key. It expires (expires_at). |
expires_at |
string |
An ISO-8601 timestamp in UTC. |
content_type |
string |
audio/wav, audio/ogg, audio/webm or audio/mpeg. |
duration_ms |
integer | null |
— |
channels |
integer |
2: the customer on the left channel, the assistant or agent on the right. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const recordingLink = await mv.calls.retrieveRecording("call_7Hk2Lm9Qp");console.log(recordingLink);retrieveSummary()
Section titled “retrieveSummary()”Retrieve a call’s summary. The AI summary written when the call ended (when the assistant’s summary artefact is on), or the last one created with POST.
mv.calls.retrieveSummary(id: CallsRetrieveSummaryData["path"]["id"], options?: RequestOptions): Promise<CallsRetrieveSummaryResponse>GET /calls/{id}/summary · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallSummary:
| Field | Type | Description |
|---|---|---|
object |
"call_summary" |
Always call_summary. |
call_id |
string |
A call ID (prefix call_). |
text |
string |
A two-to-four sentence summary, in the language of the call. |
intent |
string |
What the caller wanted. |
outcome |
string |
How the call ended, or what was agreed. |
sentiment |
"positive" | "neutral" | "negative" | "mixed" |
— |
key_points |
string[] |
— |
action_items |
string[] |
Follow-ups for your business; empty when there are none. |
generated_at |
string | null |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callSummary = await mv.calls.retrieveSummary("call_7Hk2Lm9Qp");console.log(callSummary);retrieveTranscript()
Section titled “retrieveTranscript()”Retrieve a call’s transcript. Everything said on the call, in order, with the speaker of each segment. While the call runs, the transcript so far.
mv.calls.retrieveTranscript(id: CallsRetrieveTranscriptData["path"]["id"], options?: RequestOptions): Promise<CallsRetrieveTranscriptResponse>GET /calls/{id}/transcript · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Transcript:
| Field | Type | Description |
|---|---|---|
object |
"transcript" |
Always transcript. |
call_id |
string |
A call ID (prefix call_). |
language |
string | null |
The call’s main language (BCP 47), when known. |
segments |
TranscriptSegment[] |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const transcript = await mv.calls.retrieveTranscript("call_7Hk2Lm9Qp");console.log(transcript);sendDtmf()
Section titled “sendDtmf()”Send DTMF tones. Calls handled by a human agent: plays the keys to the far end (for example to navigate another company’s IVR).
mv.calls.sendDtmf(id: CallsSendDtmfData["path"]["id"], body: CallsSendDtmfData["body"], options?: RequestOptions): Promise<CallsSendDtmfResponse>POST /calls/{id}/dtmf · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.digits |
string |
yes | The keys to send to the far end; , pauses. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.sendDtmf("call_7Hk2Lm9Qp", { digits: "1234#",});console.log(callControl);sendSupervisionWhisper()
Section titled “sendSupervisionWhisper()”Whisper in writing. Shows the agent a written note from the supervisor (at most 500 characters). The customer never sees or hears it. Needs the supervisor policy’s whispers and the role’s supervisor.whisper (403 forbidden).
mv.calls.sendSupervisionWhisper(id: CallsSendSupervisionWhisperData["path"]["id"], supervisionId: CallsSendSupervisionWhisperData["path"]["supervision_id"], body: CallsSendSupervisionWhisperData["body"], options?: RequestOptions): Promise<CallsSendSupervisionWhisperResponse>POST /calls/{id}/supervise/{supervision_id}/whisper · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
supervision_id |
string |
yes | A supervision ID (sup_…). |
body.text |
string |
yes | What the agent reads on their screen (at most 500 characters). The customer never sees or hears it. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”SupervisionWhisper:
| Field | Type | Description |
|---|---|---|
object |
"supervision_whisper" |
Always supervision_whisper. |
supervision_id |
string |
A supervision ID (prefix sup_). |
call_id |
string |
A call ID (prefix call_). |
text |
string |
What the agent was shown. |
sent_at |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const supervisionWhisper = await mv.calls.sendSupervisionWhisper("call_7Hk2Lm9Qp", "sup_7Hk2Lm9Qp", { text: "Offer the annual plan: 10% off is approved.",});console.log(supervisionWhisper);stream()
Section titled “stream()”Stream a call’s live events. Server-Sent Events for one call: call.state_changed, transcript.partial, transcript.final, call.tool_called, and call.ended, after which the stream closes. The stream starts with what already happened on the call. Reconnect with Last-Event-ID (EventSource does it for you) to get only what you missed. An ended call’s stream sends call.ended at once. A call that has not started yet (a web call before the browser connects) is a 404: subscribe once it starts, or follow it on GET /v1/events/stream. Counts against the key’s stream limit (concurrency_limit, limit_type: api_streams).
mv.calls.stream<K extends CallStreamEventType = CallStreamEventType>(callId: string, options?: CallStreamOptions<K>): EventStream<Extract<CallStreamEvent, { type: K }>>GET /calls/{id}/events · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
query.types |
string |
no | Only these event types (comma-separated or repeated): call.state_changed, transcript.partial, transcript.final, call.tool_called, call.ended, transcript.*, call.* or *. Default: all of them. |
query.last_event_id |
string |
no | Resume after this event, for clients that cannot send the Last-Event-ID header (the header wins when both are sent). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”An EventStream of events.
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
for await (const event of mv.calls.stream("call_7Hk2Lm9Qp")) { console.log(event.type, event.data.object);}supervise()
Section titled “supervise()”Supervise a call. Starts supervising a live call handled by an agent: listen (hear both sides, unheard), whisper (only the agent hears you) or barge (both hear you). Returns a pending supervision with a short-lived client_token: pass it to the supervisor’s browser, where supervise({ token }) of @morevoice/web connects the audio (WebRTC) over ws_url. The organisation’s supervisor policy and the supervisor’s role apply as on the supervisor board, and the agent is shown the supervisor when the policy says so. Change the mode with PATCH, end it with DELETE. AI calls answer 409 unsupported_for_call_mode.
mv.calls.supervise(id: CallsSuperviseData["path"]["id"], body?: CallsSuperviseData["body"], options?: RequestOptions): Promise<CallsSuperviseResponse>POST /calls/{id}/supervise · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.mode |
"listen" | "whisper" | "barge" |
no | listen: the supervisor hears both sides and nobody hears them. whisper: the agent hears the supervisor, the customer never does. barge: the supervisor joins the conversation and both hear them. |
body.name |
string |
no | The name the agent sees (when your supervisor policy shows supervisors to agents) and the audit trail records. Default: the member’s name, else Supervisor. |
body.origin |
string |
no | The only website the token opens the supervision from (https://app.example.com): the browser’s Origin must match. Strongly recommended. Default: the agent session’s origin, when supervisor.agent_session_id names one. http is accepted for localhost only. |
body.supervisor |
object |
no | Who supervises. Omitted: your API key itself (its supervision:write scope), shown to the agent as name. |
body.ttl_s |
integer |
no | How long the browser has to connect, in seconds (300–900, default 300). A supervision nobody joins in time ends (not_connected). Once connected, the socket hands out fresh tokens, so the supervision lasts as long as the call. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”SupervisionWithToken:
| Field | Type | Description |
|---|---|---|
id |
string |
The supervision’s ID. |
object |
"supervision" |
Always supervision. |
livemode |
boolean |
true in live mode, false in test mode. |
call_id |
string |
The call being supervised. |
mode |
"listen" | "whisper" | "barge" |
listen: the supervisor hears both sides and nobody hears them. whisper: the agent hears the supervisor, the customer never does. barge: the supervisor joins the conversation and both hear them. |
status |
"pending" | "active" | "reconnecting" | "ended" |
pending: the browser has not joined yet. active: the supervisor is on the call. reconnecting: the browser’s connection dropped; it rejoins in the same mode by itself (the supervision ends if it is not back within 30 seconds). ended: see end_reason. |
supervisor |
object |
Who supervises. |
created |
string |
An ISO-8601 timestamp in UTC. |
started_at |
string | null |
When the supervisor first joined the call. |
ended_at |
string | null |
— |
end_reason |
"api" | "left" | "call_ended" | "disconnected" | "not_connected" | "agent_session_ended" | null |
Why it ended: api (DELETE), left (the browser left), call_ended, disconnected (the browser did not come back within 30 seconds), not_connected (nobody joined before the token expired), agent_session_ended. |
client_token |
string |
A short-lived token for the supervisor’s browser: supervise({ token }) of @morevoice/web connects with it. It opens this supervision only; never put your API key in the page. |
ws_url |
string |
Where the browser connects: <ws_url>?client_token=<token> (supervise() does it for you). |
expires_at |
string |
The browser must connect before this. Once connected, it gets fresh tokens over the socket. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const supervisionWithToken = await mv.calls.supervise("call_7Hk2Lm9Qp", { mode: "listen", origin: "https://app.example.com", supervisor: { user_id: "usr_5ZaH2Ld9QmPx3RtYk8BvNw", },});console.log(supervisionWithToken);transcriptStream()
Section titled “transcriptStream()”Stream a call’s live transcript. Server-Sent Events with what is said on a call as it is said: transcript.partial while a line is spoken (its text so far) and transcript.final when it is complete. Every event of one line carries the same line_id (the same line object as the transcript.final webhook’s data.object), and a later one supersedes the earlier: a final replaces its partials. speaker is customer (the caller), assistant (the AI), agent (a human agent), supervisor or external (a transfer party); AI and human calls alike. start_ms and end_ms are when the line began and became final, in milliseconds from the call’s start, as recorded live (the lines spoken before the stream connected have them too; the call’s transcript has the exact times after the call). The stream starts with the conversation so far and ends with call.ended. Reconnect with Last-Event-ID to get only what you missed. Send partials=false for complete lines only. Counts against the key’s stream limit (concurrency_limit, limit_type: api_streams).
mv.calls.transcriptStream(callId: string, options?: CommonStreamOptions & { untilEnded?: boolean }): EventStream<TranscriptStreamEvent>GET /calls/{id}/transcript/stream · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
query.partials |
string |
no | false: only complete lines (transcript.final), no partials. Default true. |
query.last_event_id |
string |
no | Resume after this event, for clients that cannot send the Last-Event-ID header (the header wins when both are sent). |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”An EventStream of events.
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
for await (const event of mv.calls.transcriptStream("call_7Hk2Lm9Qp")) { console.log(event.type, event.data.object);}transfer()
Section titled “transfer()”Transfer a call. AI and IVR calls: to a queue or a phone number (warm: note is whispered to the person who answers). Calls handled by a human agent: to a queue, a number, an AI assistant or another agent, cold or warm (warm: the agent consults the target first; finish with POST …/consult/complete). Returns the call’s control state.
mv.calls.transfer(id: CallsTransferData["path"]["id"], body: CallsTransferData["body"], options?: RequestOptions): Promise<CallsTransferResponse>POST /calls/{id}/transfer · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
body.to |
object |
yes | Where to: a queue, a phone number, an AI assistant or a human agent. |
body.mode |
"cold" | "warm" |
no | cold: hand the call over. warm: talk to the target first (human calls), or whisper note to them (AI calls). |
body.note |
string |
no | Context for the target: shown with the queued call, whispered on a warm transfer. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.transfer("call_7Hk2Lm9Qp", { mode: "warm", note: "VIP customer, order A-1042", to: { number: "+97235551234", },});console.log(callControl);updateParticipant()
Section titled “updateParticipant()”Mute, hold or change the role of a participant. Changes one participant of a call handled by a human agent: mute or unmute them (muted), put them on hold or take them off (held), or change their role. Send only what changes. The answer is the call’s control state after the change. AI and IVR calls answer 400 with the code unsupported_for_call_mode.
mv.calls.updateParticipant(id: CallsUpdateParticipantData["path"]["id"], participantId: CallsUpdateParticipantData["path"]["participant_id"], body?: CallsUpdateParticipantData["body"], options?: RequestOptions): Promise<CallsUpdateParticipantResponse>PATCH /calls/{id}/participants/{participant_id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
participant_id |
string |
yes | A participant_id from the call’s control state. |
body.held |
boolean |
no | |
body.muted |
boolean |
no | |
body.role |
"moderator" | "member" |
no | |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options.headers["Idempotency-Key"] |
string |
no | A unique key (for example a UUID) that makes this request safe to retry: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”CallControl:
| Field | Type | Description |
|---|---|---|
object |
"call_control" |
Always call_control. |
call_id |
string |
A call ID (prefix call_). |
status |
CallStatus |
queued (placed, not ringing yet), ringing, in_progress (answered, or an inbound call being handled) or ended. |
type |
CallType |
Who handles the call: an AI assistant, a human agent, an IVR flow, a conference room, or a voicemail box. |
phase |
"active" | "held" | "consulting" | "conference" |
— |
held |
boolean |
The customer is on hold. |
consult |
object | null |
A running consultation (warm transfer). |
participants |
CallParticipant[] |
— |
recording |
boolean |
— |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const callControl = await mv.calls.updateParticipant("call_7Hk2Lm9Qp", "participant_id_123", { muted: true,});console.log(callControl);updateSupervision()
Section titled “updateSupervision()”Change a supervision’s mode. Switches the supervisor between listen, whisper and barge at once (the browser’s audio follows; a supervisor still connecting joins in the new mode). The supervisor policy and role apply again (403 forbidden). An ended supervision answers 409 resource_conflict.
mv.calls.updateSupervision(id: CallsUpdateSupervisionData["path"]["id"], supervisionId: CallsUpdateSupervisionData["path"]["supervision_id"], body: CallsUpdateSupervisionData["body"], options?: RequestOptions): Promise<CallsUpdateSupervisionResponse>PATCH /calls/{id}/supervise/{supervision_id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
yes | A call ID (call_…). |
supervision_id |
string |
yes | A supervision ID (sup_…). |
body.mode |
"listen" | "whisper" | "barge" |
yes | listen: the supervisor hears both sides and nobody hears them. whisper: the agent hears the supervisor, the customer never does. barge: the supervisor joins the conversation and both hear them. |
options.headers["MoreVoice-Version"] |
string |
no | The API version to use for this request. Defaults to the version the API key is pinned to. |
options |
RequestOptions |
no | idempotencyKey, extra headers and an abort signal: see retries and idempotency. |
Returns
Section titled “Returns”Supervision:
| Field | Type | Description |
|---|---|---|
id |
string |
The supervision’s ID. |
object |
"supervision" |
Always supervision. |
livemode |
boolean |
true in live mode, false in test mode. |
call_id |
string |
The call being supervised. |
mode |
"listen" | "whisper" | "barge" |
listen: the supervisor hears both sides and nobody hears them. whisper: the agent hears the supervisor, the customer never does. barge: the supervisor joins the conversation and both hear them. |
status |
"pending" | "active" | "reconnecting" | "ended" |
pending: the browser has not joined yet. active: the supervisor is on the call. reconnecting: the browser’s connection dropped; it rejoins in the same mode by itself (the supervision ends if it is not back within 30 seconds). ended: see end_reason. |
supervisor |
object |
Who supervises. |
created |
string |
An ISO-8601 timestamp in UTC. |
started_at |
string | null |
When the supervisor first joined the call. |
ended_at |
string | null |
— |
end_reason |
"api" | "left" | "call_ended" | "disconnected" | "not_connected" | "agent_session_ended" | null |
Why it ended: api (DELETE), left (the browser left), call_ended, disconnected (the browser did not come back within 30 seconds), not_connected (nobody joined before the token expired), agent_session_ended. |
Example
Section titled “Example”import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const supervision = await mv.calls.updateSupervision("call_7Hk2Lm9Qp", "sup_7Hk2Lm9Qp", { mode: "whisper",});console.log(supervision);