osmTalk Docs

API Reference

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

Machine-readable specs

FormatWhereWhat to do with it
OpenAPI 3.1apps/api/openapi.yamlImport into Stoplight / Swagger UI / Insomnia / your code generator. Also drives the Postman collection.
Postman v2.1 collectionapps/api/osmtalk.postman_collection.jsonPostman → Import → File → Drag in. Set bearerToken and baseUrl collection variables, you're done. 37 ready-made requests.
TypeScript SDKnpm i @osmapi/osmtalk-sdkDrop-in client — types auto-suggest every field.
Python SDKpip install osmtalkSync + async clients, verify_webhook_signature helper included.

The Postman collection auto-adds Idempotency-Key (a fresh UUID per request) and X-Organization-Id (from the collection variable) so retried POSTs and multi-org accounts work out of the box.

Base URL

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

Authentication

osmTalk uses session-based authentication via the dashboard at app.osmtalk.com. Credentials are shared with osmAPI — sign in once, use both platforms. 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/razorpaySignatureRazorpay payment webhooks
GET/POST/api/webhooks/whatsappVerify tokenWhatsApp webhooks

osmTalk also exposes internal infrastructure webhooks for its voice transport. These are not for end-user integration; see Webhooks for your app for the events you should subscribe to.