SDKs
Official zero-dependency TypeScript and Python clients for the Ody REST API, with auto-pagination, typed errors, idempotency and webhook verification.
Both SDKs are published: npm install @ody-co/sdk (npm) and pip install ody-sdk (PyPI), both at v0.8.0. Prefer plain HTTP? Every example in these docs has a cURL tab, and you can generate a client in any language from the OpenAPI spec.
| TypeScript | Python | |
|---|---|---|
| Package | @ody-co/sdk | ody-sdk (imported as ody) |
| Version | 0.8.0 | 0.8.0 |
| Runtime | Node.js 18+, Deno, Bun, browsers (any fetch) | Python 3.9+ |
| Dependencies | None | None (standard library only) |
| Webhook verification | verifyWebhookSignature() (server-side) | verify_webhook_signature() |
| Webhook parsing | parseWebhookEvent() → typed WebhookEvent | parse_webhook_event() → envelope dict |
| Event catalog | WEBHOOK_EVENT_TYPES, WebhookEventType, a data type per event | WEBHOOK_EVENT_TYPES |
#What they give you over raw HTTP
| Feature | TypeScript | Python |
|---|---|---|
| Auto-pagination | for await (const c of ody.contacts.listAll()) | for c in client.contacts.list_all(): |
| Typed errors | OdyError with code, status, requestId, retryAfter | OdyError with code, status, request_id, retry_after |
| Idempotency | idempotencyKey option on messages.send, numbers.buy | idempotency_key= |
| Types | Full TypeScript types for every resource | Docstrings and type hints; responses are dicts |
| Webhook signatures | Constant-time HMAC, 5-minute replay window | Same |
| Webhook events | parseWebhookEvent() verifies + parses; event.data typed per event.type | parse_webhook_event() verifies + parses |
The SDKs don't retry automatically. Wrap calls in your own backoff using retryAfter / retry_after (see Rate limits).
#Resource map
Both SDKs mirror the REST API one-to-one:
| Namespace | TypeScript methods | REST |
|---|---|---|
contacts | list, listAll, create, get, update, delete | Contacts |
conversations | list, listAll, get, setStatus, setAiTexting, aiTextingRuns — Business AI Texting hand-off | Conversations |
messages | send, search | Messages |
calls | list, place | Calls |
numbers | list, searchAvailable, buy, connectAgent, disconnectAgent, setTextingAgent — link a line's texts to an agent | Numbers |
messaging | status, register, refresh, verifyOtp, resendOtp | Messaging |
agent | get, update, publish — the primary agent | Agent |
agents | list, create, get, update, publish, attach, delete, texting, setTexting, setRecording — several agents, AI texting and AI call recording | Agent · AI Texting |
knowledge | get, search, listArticles, getArticle, createArticle, updateArticle, deleteArticle, importWebsite, refreshArticle, createFolder, updateFolder, deleteFolder | Knowledge |
linkTracking | get, update — tracked short links in outbound texts | Link tracking |
hostedMedia | get, update — every photo, video and file as a branded link.ody.co/m/… page (on by default; no per-send flag) | Hosted files |
webhooks | list, create, get, update, delete, rotate, test, deliveries, eventTypes | Webhook endpoints |
Python uses the same names in snake_case (list_all, set_status, search_available, connect_agent, verify_otp, event_types, list_articles, import_website, link_tracking.update(show_in_thread=…), hosted_media.update(website_url=…), messages.send(send_as_link=True), …).
- TypeScript SDK — Setup, usage, errors, webhook verification.
- Python SDK — Setup, usage, errors, webhook verification.