@siptel/sdk
v0.1.1
Published
Official Node.js SDK for the SIPTEL REST API (voice, AI agents, SMS, numbers, SIP).
Maintainers
Readme
@siptel/sdk
Official Node.js SDK for the SIPTEL REST API — AI voice agents, Voice API, SMS, phone numbers, and SIP trunks.
Requires Node.js 18+ (uses native fetch).
Install
npm install @siptel/sdkQuick start
import { Client } from "@siptel/sdk";
const client = new Client({ apiKey: process.env.SIPTEL_API_KEY! });
const agents = await client.agent.listAgents();
console.log(agents);
await client.agent.createCall({
phone_number: "+31612345678",
caller_id: "+31201234567",
voice: "Rachel",
record: true,
voicemail_action: "hangup",
greeting_message: "Hello!",
task_prompt: "You are a helpful assistant.",
});Configuration
| Option | Env | Default |
|--------|-----|---------|
| API key | SIPTEL_API_KEY | — |
| Base URL | — | https://api.siptel.ai |
| Timeout | — | 30s |
| User-Agent | SIPTEL_USER_AGENT | SiptelNodeSDK/0.1 |
new Client({
apiKey: "sk_live_...",
baseUrl: "https://api.siptel.ai",
timeoutMs: 60_000,
});API layout
| Namespace | Use |
|-----------|-----|
| client.agent | AI agent calls, list/get agents |
| client.voice | Voice API (play, gather, transfer, hangup, call status) |
| client.sip | SIP users / trunks |
| client.sms | Send SMS, list SMS apps |
| client.numbers | List/search/purchase/assign numbers |
Errors
import {
AuthenticationError,
InvalidRequestError,
NotFoundError,
PaymentRequiredError,
RateLimitError,
APIError,
} from "@siptel/sdk";Escape hatch
await client.post("/v1/agent/call", { ... });
await client.get("/v1/custom/path");Development
npm install
npm run build
npm testnpm organization
Publish under the @siptel scope on npm (create the org at npmjs.com if needed):
npm publish --access publicLicense
MIT — see LICENSE.
