Developer documentation
Build voice agents
in TypeScript
A TypeScript SDK, signed webhooks and a documented REST API. Built by developers, for developers.
terminal
npm install hmsovereign
# or
pnpm add hmsovereign
# or
bun add hmsovereignQuickstart
Five minutes from install to first call
01
Install the SDK
Add the hmsovereign package to your project.
terminal
npm install hmsovereign
# or
pnpm add hmsovereign
# or
bun add hmsovereign02
Initialize the client
Use your organization API key from the dashboard.
index.ts
import { HMSSovereign } from "hmsovereign"
const client = new HMSSovereign({
apiKey: process.env.VOICEDOCK_API_KEY!,
})
// List existing assistants
const assistants = await client.assistants.list()
console.log(`You have ${assistants.length} assistants`)03
Create your first assistant
Configure provider, voice, and system prompt.
assistant.ts
const assistant = await client.assistants.create({
name: "Customer Support",
first_message: "Hi, how can I help you today?",
llm_config: {
provider: "openai",
model: "gpt-5.4-mini",
messages: [
{
role: "system",
content: `You are a helpful support agent
for an e-commerce store. Be concise.`,
},
],
},
stt_config: {
provider: "deepgram",
model: "nova-3-general",
language: "nl",
},
tts_config: {
provider: "elevenlabs",
voice_id: "ukiwGs47sHyibruHJ1vg",
},
})04
Start a call
Trigger an outbound call or accept an inbound one.
call.ts
// Outbound call
const call = await client.calls.create({
destination: "+31612345678",
assistant_id: assistant.id,
})
// Status updates arrive on your webhook
console.log(call.call_id)API surface
Endpoints you'll actually use
A small, focused API. No abstractions to fight.
GET
/api/v1/assistantsList your assistantsPOST
/api/v1/assistantsCreate a new assistant configurationPOST
/api/v1/calls/outboundInitiate an outbound callGET
/api/v1/calls/{id}Fetch call details and transcriptsGET
/api/v1/numbersList your phone numbersRealtime events
Subscribe to what matters
Answer tool calls, follow call status and receive the full transcript after the call, all over one signed webhook channel.
assistant-requestIncoming call — return the assistant config to handle it
status-updateCall lifecycle updates (in-progress, ended, ended-with-error)
tool-callsAssistant invoked a tool — your handler runs here
end-of-call-reportFinal transcript, recording URL, analysis on hangup
Ready to dive in?
Read the full docs or grab the SDK from npm.
Fully typed
OpenAPI spec
Zero config