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 hmsovereign
Quickstart

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 hmsovereign
02

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. Prefer to work from an AI assistant? Our MCP server lets you create and manage assistants, numbers and calls from Claude or another MCP client.

GET/api/v1/assistants
POST/api/v1/assistants
POST/api/v1/calls/outbound
GET/api/v1/calls/{id}
GET/api/v1/numbers
Realtime 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-request

Incoming call — return the assistant config to handle it

status-update

Call lifecycle updates (in-progress, ended, ended-with-error)

tool-calls

Assistant invoked a tool — your handler runs here

end-of-call-report

Final 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