Skip to main content

Worked sequences

The operation list below documents each endpoint with its parameters, but the push lifecycle — register a device → send → ack engagement → schedule — spans several calls, and the response bodies are what you branch on. These sequences show each call with the body it returns. The end-to-end workflow guide is Push integration; this section adds the per-operation worked bodies the operations list below doesn’t carry. Copy a request as written, substitute your own ids, and compare the response envelope. Errors follow Devotel Orbit’s { error, meta } envelope.

Sequence 1 — register a device token

A device becomes reachable once it registers a token against an Orbit user. The same token upserts on re-register (idempotent), and passing app_install_id retires the previous token on a reinstall.
201
Save the returned id — you can target this device directly with device_token_ids on send. For platform: "web", supply the subscription envelope (PushSubscription.toJSON()) instead of token. Node SDK escape hatch. The call is the same body through orbit.request when the typed SDK surface doesn’t cover a field yet:
Once your first token lands, fire POST /api/v1/push/test-send to validate the whole provider credential chain against the calling user’s own devices, with no campaign stats pollution.

Sequence 2 — send with targeting

POST /api/v1/push/send takes exactly one of two targeting shapes: device_token_ids (specific devices) or user_ids (everywhere a user registered). user_ids: ["*"] broadcasts to every opted-in device, capped at 100,000 deliverable tokens. An immediate send returns 201; read notifications[] per device — a top-level success does not mean every device accepted.
201
Per-device status is sent (provider accepted), failed (provider rejected — read the error string; permanent failures retire the token), or skipped (frequency cap or suppression gated it). Provider-reported permanent failures retire the token automatically.

Sequence 3 — ack engagement

The client SDK (or service worker) acks delivered when the device renders the push and opened when the user taps it. The update is idempotent — the matching push.delivered / push.opened webhook fires only on the first genuine transition, so duplicate acks don’t re-emit.
200

Sequence 4 — schedule a future send

Supply send_at (ISO-8601 with offset) on /push/send to hold the payload for a future instant. The request returns 202 with a scheduled-push id; the queued row replays through the send path at send time, so targeting, caps, and suppression gates run identically.
202
Read the queued row back — the full payload, attempt count, and last error are on it; cancel it with DELETE /api/v1/push/scheduled/{id} while it is still scheduled (returns 409 once the send has left):
200
Errors to handle. These are the tenant-owned controls you configure — run broadcasts under the deliverable-cap 422 and handle the pre-send gates:

See also