osmTalk Docs

API Reference

osmTalk REST API endpoints for managing agents, calls, and billing.

Base URL

Production: https://api.osmtalk.com
Local dev:  http://localhost:4002

Authentication

osmTalk uses session-based authentication via osmAPI. For widget/embed endpoints, use an API key.

Session Auth (Dashboard)

All /api/* routes (except widget and webhooks) require an active session. The session token is sent as:

Authorization: Bearer <session-token>

API Key Auth (Widget/Embed)

Widget endpoints use API keys created in Dashboard → Settings → API Keys:

x-api-key: <your-api-key>

Agents

MethodEndpointAuthDescription
GET/api/agentsSessionList all agents
GET/api/agents/:idSessionGet agent details
POST/api/agentsSessionCreate agent
PUT/api/agents/:idSessionUpdate agent
DELETE/api/agents/:idSessionDelete agent
POST/api/agents/:id/connectSessionStart web voice call
GET/api/agents/:id/statsSessionGet agent statistics

Calls

MethodEndpointAuthDescription
GET/api/callsSessionList calls with filters
GET/api/calls/:idSessionGet call details + transcript
POST/api/calls/outboundSessionStart outbound phone call
POST/api/calls/:id/transferSessionTransfer call to human
POST/api/calls/:id/endSessionEnd active call

Billing

MethodEndpointAuthDescription
GET/api/billing/balanceSessionCurrent credit balance
POST/api/billing/create-payment-intentSessionCreate Razorpay order
POST/api/billing/calculate-feesSessionPreview fees
GET/api/billing/transactionsSessionPayment history
GET/api/billing/usageSessionCall cost history

Widget (Embed)

MethodEndpointAuthDescription
POST/api/widget/agents/:id/connectAPI KeyStart voice call from widget
POST/api/widget/agents/:id/chatAPI KeySend chat message
POST/api/widget/calls/outboundAPI KeyOutbound call (MCP)
GET/api/widget/agentsAPI KeyList agents
GET/api/widget/phone-numbersAPI KeyList phone numbers
GET/api/widget/callsAPI KeyCall history
GET/api/widget/calls/:idAPI KeyCall details
GET/api/widget/dashboardAPI KeyDashboard stats

Phone Numbers

MethodEndpointAuthDescription
GET/api/phone-numbersSessionList phone numbers
POST/api/phone-numbersSessionAdd existing number
PUT/api/phone-numbers/:idSessionUpdate number
DELETE/api/phone-numbers/:idSessionRemove number

Telephony

MethodEndpointAuthDescription
GET/api/telephony/numbers/searchSessionSearch available numbers
POST/api/telephony/numbers/buySessionBuy a phone number
POST/api/telephony/numbers/provisionSessionProvision existing number
GET/api/telephony/numbers/ownedSessionList owned numbers

Webhooks

MethodEndpointAuthDescription
POST/api/webhooks/livekitSignatureLiveKit event webhooks
POST/api/webhooks/razorpaySignatureRazorpay payment webhooks
GET/POST/api/webhooks/whatsappVerify tokenWhatsApp webhooks