Available on the Corporate plan. This capability is part of woku’s enterprise features. Talk to our sales team.
woku package is the official server-side client for the woku
management API in Python. With a synchronous client (Woku) and its
asynchronous twin (AsyncWoku) over httpx you manage external trackers, VoC
tools (NPS, CSAT, CES), wokus, forms, flows, action plans, support
tickets, survey sends and delivery tracking, all over the public v1 API. It
is the counterpart of the JavaScript SDK, with
the same surface.
Installation
py.typed, so type checkers pick up
its types with no extra configuration.
Initialization
Create aWoku instance once and reuse it.
api_key, the SDK reads the WOKU_API_KEY environment variable.
Request bodies accept a plain dict (as in the examples) or a Pydantic model
generated from
woku._generated.models.
Authentication
The SDK authenticates with the Company Key, the same secret key the API uses. The company owner gets it from the company Information section in the admin app: admin.woku.app.Rotate or revoke the key
Rotating generates a new key and immediately invalidates the previous one; store the returned key before continuing.Quickstart
An end-to-end flow: create a tracker, create an NPS tool, send it and read the response rate.Async client
AsyncWoku exposes the same resources with await methods and async for
iteration. Use it as a context manager to close the connection pool.
Main flows
Support tickets
Tickets are generated by woku’s AI. You can list, filter and curate them.Action plans
Pagination
List methods return an iterable page. Iterate every item across pages, or walk page by page:async for.
Idempotency
Creates carry an automaticIdempotency-Key, so a retry after a transient
failure never creates twice. Actions (send, test, reply) are not retried on
their own. You can pass your own key per call with the options argument.
Error handling
Every failure is aWokuError. HTTP errors are typed subclasses carrying the
server status, body and request_id:
WokuConnectionError and
WokuTimeoutError. The SDK retries GETs and idempotent writes automatically
with backoff, honoring the Retry-After header.
Per-call configuration
Every method accepts overrides in theoptions argument:
Resources
trackers, nps_tools / csat_tools / ces_tools, nps / csat / ces,
wokus, forms, flows, action_plans, action_plan_groups, tickets,
ticket_destinations, dispatches, reports, company, quarantines.
Versioning
The SDK follows semantic versioning (MAJOR.MINOR.PATCH). The current
published version is 0.1.0. We recommend pinning a compatible range (for
example >=0.1,<0.2) and reviewing the changelog before a MAJOR bump. Versions
and their notes are on PyPI and the
GitHub releases.
Resources
- PyPI package: woku
- Code and examples: github.com/wokuApp/woku-python
- Equivalent JavaScript SDK: JavaScript SDK
- API reference: API Integration Guide