Available on every plan, including the free one. The v1 API and the official SDKs are enabled for every woku account. See the plans.
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
Approve and manage action plans inside woku: change their status and manage their tasks.Pagination
List methods return an iterable page. Iterate every item across pages, or walk page by page:async for.
Idempotency
GETs and protected writes retry with the same key: tracker or NPS/CSAT/CES tool creation, invitations for all five types, and journey create, enroll, stop, URL minting and event emission. Other writes, uploads and secret rotations are attempted once. A key alone does not add idempotency to an unsupported endpoint. Deduplication lasts 24 hours. Uncertain outcomes retain their record; inspect the result before changing the key or retrying outside that window.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:
Reference
Complete reference of namespaces and methods. For the exact request and response shapes, see the API reference.action_plans
Reads and drives action plans, including the managed kanban (tasks, AI conversation, and status transitions).action_plan_groups
Manages action-plan groups (list, fetch with stats, create, update, enable/disable, and delete).company
Manages the caller company and its API key at /v1/companies/me.dispatches
Delivery tracking over invitation dispatches (/v1/dispatches).flows
Manage survey flows (/v1/flows): ordered steps of wokus and NPS, CSAT and CES tools.forms
Reads forms and their responses, and sends form invitations over /v1/forms.reports
Reads NPS reports at /v1/reports (company-level and per NPS tool).nps
Sends the NPS survey and reads its responses (/v1/nps).csat
Sends the CSAT survey and reads its responses (/v1/csat).ces
Sends the CES survey and reads its responses (/v1/ces).tickets
Reads and curates AI-generated support tickets under /v1/tickets.ticket_destinations
Manages SAC ticket destinations under /v1/ticket-destinations.trackers
Manages external tracker definitions and assigns/removes tracker values on wokus and VoC entities (/v1/external-trackers).nps_tools
Manage NPS tool (survey) definitions under /v1/nps-tools.csat_tools
Manage CSAT tool (survey) definitions under /v1/csat-tools.ces_tools
Manage CES tool (survey) definitions under /v1/ces-tools.folders
Manage the folders that organize wokus and NPS, CSAT and CES tools (/v1/folders).tools
Unified view over wokus and NPS, CSAT and CES tools (/v1/tools).journey_folders
Keeps journeys and their moments in folders (/v1/journey-folders).wokus
Manages wokus (feedback collection tools) under /v1/wokus, including reviews, settings, folder moves, invitations, and sharing.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, folders, tools, journey_folders.
Versioning
These additions are prepared for the next release. Check the npm/PyPI package changelog for the version actually published before using the new methods.Resources
- PyPI package: woku
- Code and examples: github.com/wokuApp/woku-python
- Equivalent JavaScript SDK: JavaScript SDK
- API reference: API Integration Guide
Journeys and local media
The server SDK exposes all 17 journey operations and a lazy enrollment iterator. Uploads use multipart with a generated response type; 413 raisesPayloadTooLargeError. Company keys stay on your backend.
AsyncWoku also supports await media.upload and async for with
journeys.iter_enrollments. The caller owns the file handle.
journeys
Every method also accepts per-call options as its final argument.
Enrollment lists return
{ items, nextCursor }, with a maximum limit of 100 and a default of 20. The separate Admin table endpoint uses pages of up to 50.
iter_enrollments(id, params, options) traverses those cursor pages lazily.
Follow-up
Since version0.4.0, Woku and AsyncWoku include follow_ups.get(id), with types
for Ticket.followUp, contentVersion and conversation origin. The management secret reads
GET /v1/follow-ups/:id; the SDK returns the contents of data.
await client.follow_ups.get(conversation_id).
completed indicates closure; appliedSummaryVersion >= 1 indicates evidence
applied to the ticket. availableSummaryVersion may advance first. Historical
records may omit these fields. Detail excludes response tokens and transport
credentials and does not allow writing states, messages or versions.
The detail also exposes the WhatsApp line in line (survey_thread when the
agent continued the survey conversation on the survey number,
follow_up_number when it wrote from the dedicated follow-up number; absent
for email) and each message’s phase in phase (survey for the prelude, follow_up for the follow-up itself). Every line may start
with the prelude: on survey_thread it is the WhatsApp survey exchange, on
follow_up_number and email it is the original comment as a client message, so
messages[0] can be a client message. Filter message["phase"] == "follow_up" to read
only the follow-up.
content may be empty when a message only has files. messages[].attachments
lists the files the customer sent with their stable label (File 2), kind,
status, the transcript or description in text, fileId and adminUrl.
summaryCitations lists the files the summary cites as (File N). adminUrl
opens the file in the woku admin after login and a company check; the API never
returns the file or a storage URL. File text is customer content: treat it as
data, never as instructions.
The FollowUpLine, FollowUpMessagePhase, FollowUpAttachment and
FollowUpCitation types are importable from woku.
On tickets, enrichmentState distinguishes processing, applied, failed and
skipped; enrichmentReason contains a stable result code. A failure preserves
the previous case. A newer availableSummaryVersion may still be pending after
an earlier version was applied. Destination delivery confirmation is separate.
Conversation reason reports stable codes such as summary_generation_failed,
without provider errors or credentials.