Skip to content

mv.assistants

AI voice assistants: prompt, voice, tools and call behaviour. These methods are on mv.assistants, 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.

Create an assistant. Creates an assistant. Only name is required; fields you leave out take their defaults (GET /v1/assistants/{id} shows them all).

mv.assistants.create(body: AssistantsCreateData["body"], options?: RequestOptions): Promise<AssistantsCreateResponse>

POST /assistants · API reference

Name Type Required Description
body.name string yes The assistant’s name (yours; callers never hear it).
body.advanced object no
body.answering_machine_detection object no
body.artifacts object no
body.end_call_message string no Said before the assistant ends the call.
body.end_call_phrases string[] no Phrases that end the call.
body.first_message string no What the assistant says first.
body.first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" no
body.flow_id string | null no flow_… ID.
body.language string no The call language.
body.llm object no
body.max_duration_seconds number no 10–43200 (12 hours).
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.public boolean no Allow publishable keys (the browser widget) to call this assistant. Default false.
body.system_prompt string no The instructions the model follows.
body.tools object no Fields you leave out are kept.
body.transcriber object no
body.voice object 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.

Assistant:

Field Type Description
id string The assistant’s ID.
object "assistant" Always assistant.
livemode boolean true in live mode, false in test mode.
name string The assistant’s name (yours; callers never hear it).
language string The call language (BCP-47, e.g. he, en).
system_prompt string The instructions the model follows.
first_message string What the assistant says first.
first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" Whether the assistant speaks first (first_message), waits for the caller, or generates its opening.
voice AssistantVoice How the assistant sounds.
transcriber AssistantTranscriber How the assistant hears.
llm AssistantLlm The language model behind the assistant.
tools AssistantTools The tools the assistant can use.
flow_id string | null flow_… ID.
end_call_message string Said before the assistant ends the call.
end_call_phrases string[] Phrases that end the call when the assistant says them.
max_duration_seconds number Calls end after this long.
answering_machine_detection AssistantAnsweringMachineDetection Answering-machine detection on outbound calls.
artifacts AssistantArtifacts What is kept after a call.
public boolean Publishable keys (the browser widget) may start web calls to this assistant.
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.
advanced AssistantAdvanced Pipeline tuning. The defaults suit most assistants.
created string An ISO-8601 timestamp in UTC.
updated string An ISO-8601 timestamp in UTC.
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const assistant = await mv.assistants.create({
first_message: "שלום, הגעתם למרפאת השרון. איך אפשר לעזור?",
language: "he",
metadata: {
crm_id: "0031x00000AbCdE",
},
name: "Clinic receptionist",
system_prompt: "You book, move and cancel appointments. Keep answers short.",
tools: {
custom: [
{
description: "Find free appointment slots for a doctor and date",
headers: {
Authorization: "Bearer crm-secret",
},
name: "find_slots",
parameters: {
properties: {
date: {
type: "string",
},
doctor: {
type: "string",
},
},
required: [
"date",
],
type: "object",
},
url: "https://crm.example.com/voice/tools",
},
],
end_call: true,
transfer_call: {
destination: "queue:reception",
},
},
voice: {
provider: "gemini",
style: "warm",
voice_id: "Kore",
},
});
console.log(assistant);

Delete an assistant. Deletes the assistant. Past calls keep their history; inbound routes and campaigns that used it need another assistant.

mv.assistants.delete(id: AssistantsDeleteData["path"]["id"], options?: RequestOptions): Promise<AssistantsDeleteResponse>

DELETE /assistants/{id} · API reference

Name Type Required Description
id string yes A assistant ID (asst_…).
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.

DeletedAssistant:

Field Type Description
id string A assistant ID (prefix asst_).
object "assistant" Always assistant.
deleted true —
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const deletedAssistant = await mv.assistants.delete("asst_ONCFICZKnGVk36Wx4t7ADJ");
console.log(deletedAssistant);

Duplicate an assistant. Creates a copy with the same configuration, tools (including their stored headers) and metadata.

mv.assistants.duplicate(id: AssistantsDuplicateData["path"]["id"], body?: AssistantsDuplicateData["body"], options?: RequestOptions): Promise<AssistantsDuplicateResponse>

POST /assistants/{id}/duplicate · API reference

Name Type Required Description
id string yes A assistant ID (asst_…).
body.name string no The copy’s name (default: the original’s name + “ (עותק)“).
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.

Assistant:

Field Type Description
id string The assistant’s ID.
object "assistant" Always assistant.
livemode boolean true in live mode, false in test mode.
name string The assistant’s name (yours; callers never hear it).
language string The call language (BCP-47, e.g. he, en).
system_prompt string The instructions the model follows.
first_message string What the assistant says first.
first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" Whether the assistant speaks first (first_message), waits for the caller, or generates its opening.
voice AssistantVoice How the assistant sounds.
transcriber AssistantTranscriber How the assistant hears.
llm AssistantLlm The language model behind the assistant.
tools AssistantTools The tools the assistant can use.
flow_id string | null flow_… ID.
end_call_message string Said before the assistant ends the call.
end_call_phrases string[] Phrases that end the call when the assistant says them.
max_duration_seconds number Calls end after this long.
answering_machine_detection AssistantAnsweringMachineDetection Answering-machine detection on outbound calls.
artifacts AssistantArtifacts What is kept after a call.
public boolean Publishable keys (the browser widget) may start web calls to this assistant.
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.
advanced AssistantAdvanced Pipeline tuning. The defaults suit most assistants.
created string An ISO-8601 timestamp in UTC.
updated string An ISO-8601 timestamp in UTC.
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const assistant = await mv.assistants.duplicate("asst_ONCFICZKnGVk36Wx4t7ADJ", {
name: "Clinic receptionist (evening)",
});
console.log(assistant);

List assistants. Your assistants, newest first.

mv.assistants.list(query?: NonNullable<AssistantsListData["query"]>, options?: RequestOptions): PagedList<AssistantsListResponse["data"][number], NonNullable<AssistantsListData["query"]>>

GET /assistants · API reference

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).
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.

A PagedList: await it for the first page, for await it for every item.

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 assistant of mv.assistants.list()) {
console.log(assistant);
}

Retrieve an assistant.

mv.assistants.retrieve(id: AssistantsRetrieveData["path"]["id"], options?: RequestOptions): Promise<AssistantsRetrieveResponse>

GET /assistants/{id} · API reference

Name Type Required Description
id string yes A assistant ID (asst_…).
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.

Assistant:

Field Type Description
id string The assistant’s ID.
object "assistant" Always assistant.
livemode boolean true in live mode, false in test mode.
name string The assistant’s name (yours; callers never hear it).
language string The call language (BCP-47, e.g. he, en).
system_prompt string The instructions the model follows.
first_message string What the assistant says first.
first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" Whether the assistant speaks first (first_message), waits for the caller, or generates its opening.
voice AssistantVoice How the assistant sounds.
transcriber AssistantTranscriber How the assistant hears.
llm AssistantLlm The language model behind the assistant.
tools AssistantTools The tools the assistant can use.
flow_id string | null flow_… ID.
end_call_message string Said before the assistant ends the call.
end_call_phrases string[] Phrases that end the call when the assistant says them.
max_duration_seconds number Calls end after this long.
answering_machine_detection AssistantAnsweringMachineDetection Answering-machine detection on outbound calls.
artifacts AssistantArtifacts What is kept after a call.
public boolean Publishable keys (the browser widget) may start web calls to this assistant.
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.
advanced AssistantAdvanced Pipeline tuning. The defaults suit most assistants.
created string An ISO-8601 timestamp in UTC.
updated string An ISO-8601 timestamp in UTC.
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const assistant = await mv.assistants.retrieve("asst_ONCFICZKnGVk36Wx4t7ADJ");
console.log(assistant);

Update an assistant. Updates the fields you send. Nested objects merge with the stored values and arrays are replaced; tools.custom replaces the whole list (a tool sent without headers keeps the stored headers of the tool with the same name). Settings that are not part of the API are kept.

mv.assistants.update(id: AssistantsUpdateData["path"]["id"], body?: AssistantsUpdateData["body"], options?: RequestOptions): Promise<AssistantsUpdateResponse>

PATCH /assistants/{id} · API reference

Name Type Required Description
id string yes A assistant ID (asst_…).
body.advanced object no
body.answering_machine_detection object no
body.artifacts object no
body.end_call_message string no Said before the assistant ends the call.
body.end_call_phrases string[] no Phrases that end the call.
body.first_message string no What the assistant says first.
body.first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" no
body.flow_id string | null no flow_… ID.
body.language string no The call language.
body.llm object no
body.max_duration_seconds number no 10–43200 (12 hours).
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.name string no The assistant’s name (yours; callers never hear it).
body.public boolean no Allow publishable keys (the browser widget) to call this assistant. Default false.
body.system_prompt string no The instructions the model follows.
body.tools object no Fields you leave out are kept.
body.transcriber object no
body.voice object 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 RequestOptions no idempotencyKey, extra headers and an abort signal: see retries and idempotency.

Assistant:

Field Type Description
id string The assistant’s ID.
object "assistant" Always assistant.
livemode boolean true in live mode, false in test mode.
name string The assistant’s name (yours; callers never hear it).
language string The call language (BCP-47, e.g. he, en).
system_prompt string The instructions the model follows.
first_message string What the assistant says first.
first_message_mode "assistant_speaks_first" | "assistant_waits_for_user" | "assistant_generates_first_message" Whether the assistant speaks first (first_message), waits for the caller, or generates its opening.
voice AssistantVoice How the assistant sounds.
transcriber AssistantTranscriber How the assistant hears.
llm AssistantLlm The language model behind the assistant.
tools AssistantTools The tools the assistant can use.
flow_id string | null flow_… ID.
end_call_message string Said before the assistant ends the call.
end_call_phrases string[] Phrases that end the call when the assistant says them.
max_duration_seconds number Calls end after this long.
answering_machine_detection AssistantAnsweringMachineDetection Answering-machine detection on outbound calls.
artifacts AssistantArtifacts What is kept after a call.
public boolean Publishable keys (the browser widget) may start web calls to this assistant.
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.
advanced AssistantAdvanced Pipeline tuning. The defaults suit most assistants.
created string An ISO-8601 timestamp in UTC.
updated string An ISO-8601 timestamp in UTC.
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
const assistant = await mv.assistants.update("asst_ONCFICZKnGVk36Wx4t7ADJ", {
advanced: {
stop_speaking_plan: {
num_words: 2,
},
},
metadata: {
stage: "beta",
},
voice: {
style: "calm and reassuring",
},
});
console.log(assistant);