Skip to content

Node.js SDK

@morevoice/sdk is the TypeScript client for the MoreVoice API. It runs on Node.js 18 and later, Bun, Deno and edge runtimes, uses only fetch, and has no dependencies. Its core is generated from the OpenAPI document, so every operation of the API has a typed method. Hand-written helpers cover the rest: verifying webhooks, serving custom tools, pagination, streams and safe retries.

Terminal window
npm install @morevoice/sdk

Create an API key in DevelopersAPI keys and keep it in an environment variable, MOREVOICE_API_KEY. Use a test-mode key (mv_test_…) while you build: test mode never reaches a real phone. Keys are for your server only; never put one in a browser or an app.

index.ts
import { createClient, createResources } from "@morevoice/sdk";
const mv = createResources({
client: createClient({ baseUrl: "https://api.morevoice.ai/v1", auth: process.env.MOREVOICE_API_KEY }),
});
// Check the key: which organisation, which mode, which scopes.
const me = await mv.whoami.retrieve();
console.log(`Connected to ${me.org_id} in ${me.livemode ? "live" : "test"} mode`);

Each key is pinned to the API version that was current when you created it. To try another version for one request, pass the MoreVoice-Version header in the request options:

const me = await mv.whoami.retrieve({ headers: { "MoreVoice-Version": "2026-11-01" } });

Every method takes its path parameters first, then the request body or query, then request options. Each page lists the parameters, the response and an example.

Resource Methods
mv.agents retrieveStatus()
mv.agentSessions create(), delete(), list(), retrieve(), ticket()
mv.assistants create(), delete(), duplicate(), list(), retrieve(), update()
mv.audioAssets create(), delete(), list(), retrieve(), retrieveContent(), update()
mv.callbacks addNote(), attach(), call(), cancel(), claim(), complete(), counts(), create(), list(), release(), retrieve(), start(), stats(), stream(), update()
mv.callerIds create(), delete(), list(), retrieve()
mv.calls addParticipant(), consult(), create(), createStream(), createSummary(), delete(), deleteStream(), downloadRecording(), endSupervision(), hangup(), hold(), list(), listCopilotEvents(), pci(), removeParticipant(), retrieve(), retrieveControl(), retrieveFlowPath(), retrievePci(), retrieveRecording(), retrieveSummary(), retrieveTranscript(), sendDtmf(), sendSupervisionWhisper(), stream(), supervise(), transcriptStream(), transfer(), updateParticipant(), updateSupervision()
mv.campaigns cancel(), contacts.create(), contacts.import(), contacts.list(), contacts.listAttempts(), contacts.retrieve(), contacts.update(), create(), delete(), export(), list(), pause(), preflight(), resume(), retrieve(), start(), stats(), update()
mv.cli submitToolResult()
mv.clientTokens create()
mv.cliListen stream()
mv.conferenceRooms create(), createLink(), delete(), invite(), list(), listSessions(), moderate(), retrieve(), retrieveIcs(), retrieveLive(), update()
mv.connections create(), delete(), list(), register(), retrieve(), update()
mv.consents create(), delete(), list()
mv.copilotProfiles create(), delete(), duplicate(), list(), listTemplates(), retrieve(), update()
mv.dnc check(), create(), delete(), list(), retrieve()
mv.events list(), retrieve(), stream()
mv.faxes create(), list(), retrieve(), retrieveDocument()
mv.files create(), retrieve()
mv.flows create(), delete(), duplicate(), list(), listVersions(), publish(), restore.version(), retrieve(), retrieveAnalytics(), retrieveDraft(), retrieveUsage(), retrieveVersion(), simulate(), update(), updateDraft(), validate()
mv.flowTemplates list(), retrieve()
mv.imports retrieve()
mv.inboundRoutes create(), delete(), list(), retrieve(), update()
mv.insights retrieve()
mv.invitations create(), delete(), list(), resend(), retrieve()
mv.kb documentsSearch()
mv.kbDocuments create(), delete(), list(), reingest(), retrieve(), retrieveContent()
mv.missedCalls assign(), claim(), done(), list(), reopen()
mv.openapi postman()
mv.organizations create(), list(), resume(), retrieve(), retrieveChildDefaults(), suspend(), update(), updateChildDefaults(), usage.retrieve()
mv.parkedCalls list(), pickup(), retrieve()
mv.partnerBilling invoices.list(), invoices.retrieve(), usage.retrieve()
mv.phoneNumbers create(), delete(), list(), listAvailable(), retrieve()
mv.ports cancel(), create(), list(), retrieve()
mv.qa overrideScorecardItem(), retrieveRubric(), retrieveScorecard(), run.scorecard(), updateRubric()
mv.queues create(), delete(), list(), retrieve(), retrieveLive(), update()
mv.reports catalog(), create(), delete(), downloadRunCsv(), downloadRunPdf(), list(), listRuns(), preview(), retrieve(), send(), update()
mv.requestLogs list(), retrieve(), stream()
mv.secrets delete(), list(), set()
mv.speech synthesize(), transcribe()
mv.teams create(), delete(), list(), retrieve(), update()
mv.testHelpersEvents create()
mv.testHelpersInboundCalls create()
mv.tools test()
mv.usage retrieve()
mv.users create(), delete(), list(), reactivate(), retrieve(), update()
mv.voices list(), preview()
mv.webCalls create(), retrievePracticeSession()
mv.webhookDeliveries list(), retrieve(), retry()
mv.webhookEndpoints create(), delete(), list(), replay(), retrieve(), retrievePublicKey(), rotateSecret(), test(), update()
mv.whatsappCalls create()
mv.whatsappNumbers create(), delete(), list(), retrieve(), update()
mv.whoami retrieve()
Helper What it does
Webhooks Verify webhook signatures and parse events.
Tool calls Serve custom tools: signed calls, argument checks, timeouts.
Pagination Read every item of a list, page by page.
Event streams Follow live events with async iterators.
Media streams Bring your own bot: serve media streams, decode and send audio.
Calls helpers Wait for a call to end, and for its summary.
Campaigns helpers Upload contacts from a CSV or XLSX file.
Retries and idempotency Safe retries with backoff and idempotency keys.
Errors The errors helpers.
Csv The csv helpers.
Codecs The codecs helpers.
Deprecation The deprecation helpers.

Complete examples that combine the API, webhooks and tools are collected in recipes.