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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callParticipantCreated = await mv.calls.addParticipant("call_IGuHGrBtu5JTm5igG2I8EG", { 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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.consult("call_IGuHGrBtu5JTm5igG2I8EG", "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. |
body.caller_id |
string |
no | The number to present; it must be allowed on the connection. |
body.connection_id |
string |
no | The SIP connection to call out on (default: the organisation’s default connection). |
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.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 and conference rooms. |
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 |
— |
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. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
Example
Section titled “Example”import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
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);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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callSummary = await mv.calls.createSummary("call_IGuHGrBtu5JTm5igG2I8EG", {});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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callDeleted = await mv.calls.delete("call_IGuHGrBtu5JTm5igG2I8EG");console.log(callDeleted);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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const result = await mv.calls.downloadRecording("…");console.log(result);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 and conference rooms. |
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 |
— |
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. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
Example
Section titled “Example”import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const call = await mv.calls.hangup("call_IGuHGrBtu5JTm5igG2I8EG", {});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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.hold("call_IGuHGrBtu5JTm5igG2I8EG", { 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.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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
for await (const call of mv.calls.listCopilotEvents("call_IGuHGrBtu5JTm5igG2I8EG")) { console.log(call);}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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.removeParticipant("call_IGuHGrBtu5JTm5igG2I8EG", "…");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 and conference rooms. |
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 |
— |
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. |
livemode |
boolean |
true in live mode, false in test mode. |
assistant |
CallAssistant |
The assistant of the call (expand[]=assistant). |
Example
Section titled “Example”import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const call = await mv.calls.retrieve("call_IGuHGrBtu5JTm5igG2I8EG");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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.retrieveControl("call_IGuHGrBtu5JTm5igG2I8EG");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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const flowPath = await mv.calls.retrieveFlowPath("call_IGuHGrBtu5JTm5igG2I8EG");console.log(flowPath);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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const recordingLink = await mv.calls.retrieveRecording("call_IGuHGrBtu5JTm5igG2I8EG");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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callSummary = await mv.calls.retrieveSummary("call_IGuHGrBtu5JTm5igG2I8EG");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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const transcript = await mv.calls.retrieveTranscript("call_IGuHGrBtu5JTm5igG2I8EG");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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.sendDtmf("call_IGuHGrBtu5JTm5igG2I8EG", { digits: "1234#",});console.log(callControl);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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.transfer("call_IGuHGrBtu5JTm5igG2I8EG", { 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.
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 { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({ client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),});
const callControl = await mv.calls.updateParticipant("call_IGuHGrBtu5JTm5igG2I8EG", "…", { muted: true,});console.log(callControl);