/tasks/{id} otherwise.
Campaign status changes — resource-specific task endpoint
The Wave per-event pause/resume endpoint kicks off a background task and returns204 No Content. Poll the per-event task endpoint for the
result:
GET after
the PUT, then wait for a user gesture or use a coarse interval (e.g. 3s).
Helper
Generic /tasks/{id} polling
Some services issue a task id and expose GET /tasks/{id} for status.
Status values follow the FastAPI/Celery convention: PENDING,
STARTED, SUCCESS, FAILURE. The result is delivered when state === "SUCCESS".
/tasks/{id} — it scopes correctly per-event/per-resource.
Don’t poll harder than necessary
Server budgets assume gentle polling:| Resource | Reasonable interval |
|---|---|
| Notification stats badge | ~10 s |
| Messages unread badge | low-frequency (one-shot after ~15 min, plus refresh on user actions like login or returning to a list) |
| Task state polling | ~3 s |
Combining with React Query
If you’re using@tanstack/react-query, leverage refetchInterval:
Caveats
No webhooks today
No webhooks today
There is no callback URL you can register. Plan for polling on your
side. (If your integration needs near-real-time push, talk to your
account contact — bespoke webhook arrangements are possible.)
Polling without unmount cancellation leaks
Polling without unmount cancellation leaks
Always tie your poll to an
AbortController (or component-mounted
flag, or React Query). Several reference-webapp polls don’t — don’t
copy that.Task state values are SUCCESS/FAILURE/PENDING/STARTED
Task state values are SUCCESS/FAILURE/PENDING/STARTED
Not
completed/failed/running. Match against the uppercase
enum values returned by the backend.Don't continuously poll campaign status
Don't continuously poll campaign status
The reference webapp fires a single
GET .../client_campaign_status/task
after the PUT, not a continuous loop. Mirror that to stay under
rate budgets.