Languages: every operation supports cURL, Node.js (TypeScript), Python, Go, Ruby, and PHP. The first 15 operations on this page show all six languages; the remaining 14 show cURL and TypeScript — the two most-used.
Push API
Mobile push notification delivery and device registration Base path:/api/v1/push
Endpoint count: 27
title: “Worked push samples” description: “Worked samples for the push integrator’s chain: register a device token, send to explicit device_token_ids with per-device acceptance, read the delivery receipt from the notifications log, and the registration and send errors to handle.”
Worked push samples
The operation list below documents each endpoint with its parameters, but an integrator runs one chain: register a device token → send a push → read the delivery receipt → retire the token. These samples render that chain as ordered calls with the real response envelopes you branch on. The end-to-end guide is Push integration — client SDK setup is out of scope here; 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. Every sample shows cURL and TypeScript, matching this page’s language note. Errors follow Devotel Orbit’s{ error, meta } envelope.
1. Register the device
A device becomes reachable once it registers a token against an Orbit user. Re-registering the same token upserts (idempotent), and passingapp_install_id retires the previous token on a reinstall.
cURL
TypeScript
201
id — the send below targets devices by it. For
platform: "web", supply the subscription envelope
(PushSubscription.toJSON()) instead of token. Once your first token
lands, fire POST /api/v1/push/test-send to validate the provider
credential chain against the calling user’s own devices.
2. Send a push
POST /api/v1/push/send takes one of two targeting shapes:
device_token_ids (specific devices, as here) or user_ids (everywhere a
user registered; ["*"] 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.
cURL
TypeScript
201
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). Supply a future
send_at (ISO-8601) to hold the send for a later instant; a scheduled send
answers 202 instead, and GET /api/v1/push/scheduled/{id} reads the
queued row back until DELETE cancels it while still scheduled (409
once it has left).
3. Read send status
GET /api/v1/push/notifications is the delivery log: every per-device row
carries its status, the delivered_at / opened_at receipts the client
SDK acks, and any provider error. Poll it (or listen for the
push.delivered / push.opened webhooks) to reconcile the send above to a
delivered / failed / skipped breakdown.
cURL
TypeScript
200
?cursor=<last-row-created_at>&limit=<page-size> when it
grows past one screen. A skipped row never leaves the send-time status —
no receipt arrives for a gated device.
4. Errors
Two error classes show up on every integration — read theissues list on
422s and map 404s on ids your tenant has never seen.
422 — malformed registration. A device registers with an unknown
platform (must be ios, android, huawei, or web), or with no
token / subscription for the platform it claims:
device_token_ids nor
user_ids supplied. A send that resolves to zero deliverable tokens answers
NO_DEVICE_TOKENS (422), and user_ids: ["*"] over the recipient cap
answers BROADCAST_TOO_LARGE (422).
404 — unknown device id. A token id not known to this tenant — a deleted
record, a typo, or another tenant’s id:
DELETE /api/v1/push/device-tokens/{id} on logout retires the current one.
5. Categories, scheduled sends and wake telemetry
Three smaller surfaces round out the chain above: notification categories (the action-button sets clients render), scheduled sends you queued withsend_at, and the device wake telemetry your client reports
after each push wake.
Read one category.
GET /api/v1/push/categories/{id}identifier your client
matches on, the optional sound and its action buttons.
POST /api/v1/push/categories echoes the stored
record with 201. identifier must be UPPER_SNAKE_CASE and is immutable
after create because clients cache it; to change one, delete and
recreate. A marketing category typically carries actions; a
transactional one often needs neither actions nor a sound.
GET /api/v1/push/scheduled/{id}send_at before the scheduler dispatches it.
DELETE /api/v1/push/scheduled/{id} is
a guarded status change, not a hard delete: only a row still in
scheduled status is cancelled. It answers 200 with the id and its new
status, 404 for an unknown id and 409 once the push has left
scheduled (sent or failed).
POST /api/v1/push/telemetry after a push wake with battery level, wake
count and delivery latency; the dashboard aggregates it so operators can
see the app is not draining devices. device_token_id and platform
("ios", "android", "web" or "huawei") are required and validated;
battery_pct may be omitted where the platform does not expose it (web),
and the authenticated user id is taken from the session, not from your
body. The 201 echoes the accepted report.
POST /api/v1/push/test-send fires one fixed-shape notification at every
enabled device owned by the calling operator and answers 200 with the
sent / failed counts plus one verdict per device. Your configuration
delivered everywhere when failed is 0 and sent is greater than
zero — that is the verdict the dashboard’s tester renders as success.
"tested": 2, "sent": 2, "failed": 0. Read the provider-level reason from the error string on
each failed verdict. A permanent provider rejection such as
BadDeviceToken also retires the dead token; register the device again
to retest it. With no enabled device registered to the calling user, the
endpoint answers NO_DEVICE_TOKENS (422) instead.
See also
- Push integration guide — the full lifecycle, client SDK setup, and the production credential checklist (explicitly out of scope here)
- Push Live Activities — ActivityKit start / update / end payloads
- Push channel page — provider credential setup for APNs, FCM, HMS, and VAPID
- Webhook event payloads —
push.delivered/push.openedwire shapes
List push notification categories
GET /api/v1/push/categoriesGet push notification category by ID
GET /api/v1/push/categories/{id}Get web push configuration
GET /api/v1/push/configPushSubscription, or to re-subscribe after a VAPID key rotation.
List registered device tokens
GET /api/v1/push/device-tokensuser_id query parameter. Each row carries the platform, canonical token, install identifiers and whether delivery is currently enabled. Use it to render a user’s registered devices or to audit which installs will receive a push. Capped at 200 rows.
List Live Activities
GET /api/v1/push/live-activitiesList sent push notifications
GET /api/v1/push/notificationscursor (the created_at of the last row you already hold) and limit query parameters. Use it to render the notifications log or to reconcile delivery outcomes.
List scheduled push notifications
GET /api/v1/push/scheduledstatus (scheduled, sent, cancelled, failed). Use it to review or manage pushes waiting for the scheduler to dispatch them. Capped at 200 rows.
Get a scheduled push notification
GET /api/v1/push/scheduled/{id}send_at, current status, attempt count and last error. Use it to inspect a queued push before it is dispatched, or to check why a scheduled send failed. Returns 404 when no such scheduled push exists for this tenant.
Summarize device push telemetry
GET /api/v1/push/telemetry/summaryuser_id.
List registered VoIP call-push devices
GET /api/v1/push/voip-devicesClear a user’s push badge count
POST /api/v1/push/badge/clearbadge: 0) so the springboard badge updates without showing an alert; send silent_push: false to only record the reset. Call it after the user has read their notifications — for example when they open the Inbox. When user_id is omitted it clears for the authenticated caller.
Create a push notification category
POST /api/v1/push/categoriesidentifier is wire-bound — the iOS / Android client matches on it — so it cannot be modified after create.
Register a device token
POST /api/v1/push/device-tokensios / android / huawei, or a Web Push subscription envelope for platform: web. Re-registering the same token updates its last-seen time and owner instead of creating a duplicate, and passing an app_install_id retires the install’s previous token on reinstall. Call it once the client obtains a push token from the OS.
Start a Live Activity
POST /api/v1/push/live-activitiesactivity_token vended by Activity.pushToken, an activity_type and the initial content_state; Orbit tracks the activity so it can be updated and ended later. Use it to begin a live, lock-screen experience such as order tracking or a live score.
Acknowledge a push notification
POST /api/v1/push/notifications/{id}/ackdelivered_at or opened_at timestamp. The update is idempotent, so repeated acks are safe and the matching push.delivered / push.opened webhook fires only on the first genuine transition. Send event: delivered when the device receives the push and event: opened when the user taps it; returns 404 when the notification id is unknown.
Register a device token (alias)
Need this flow in Python, Go, Ruby, or PHP? The Worked sequences section renders this surface’s hero flows in the full six-language group.
POST /api/v1/push/registerPOST /api/v1/push/device-tokens that registers or refreshes a device for push delivery with the identical request and response. Prefer POST /push/device-tokens in new integrations; this path exists for older SDK clients that still call /push/register.
Send a push notification
POST /api/v1/push/senduser_ids, device tokens or a broadcast, and Orbit applies per-user frequency caps and suppression before delivery. Provide a future send_at to schedule the notification instead of sending immediately — it is persisted and dispatched by the scheduler at that time. Returns 201 with the per-device delivery results for an immediate send, or 202 with the scheduled push id when send_at is in the future.
Report device-side push wake telemetry
POST /api/v1/push/telemetrySend a push configuration test
POST /api/v1/push/test-sendRegister a VoIP (PushKit) / high-priority FCM call token
POST /api/v1/push/voip-devicesiOS: the raw PushKit (PKPushRegistry) token. Android: the FCM registration token used for the high-priority call channel.
iOS app bundle id — the APNs apns-topic for a VoIP push is
<bundle_id>.voip. Falls back to the server-configured bundle id when omitted.Update a Live Activity
PUT /api/v1/push/live-activities/{id}content_state to a running Live Activity so its lock-screen and Dynamic Island presentation updates in place, identified by the activity’s Orbit id. Use it to advance a tracked activity — for example moving an order from Preparing to Out for delivery. Returns 404 when the activity is unknown or has already ended.
Enable or disable a device token
PATCH /api/v1/push/device-tokens/{id}enabled: true or enabled: false. A disabled token is skipped by the send path but kept on file, so you can pause a noisy device and re-enable it later. Returns the updated token row, or 404 when the id is unknown in this tenant.
Delete push notification category
DELETE /api/v1/push/categories/{id}204 No Content
Delete a device token
DELETE /api/v1/push/device-tokens/{id}204 No Content
End a Live Activity
DELETE /api/v1/push/live-activities/{id}end push, optionally with a closing content_state and a dismissal_date telling iOS when to remove it from the lock screen. Identified by the activity’s Orbit id. Call it when the tracked task completes; returns 404 when the activity is unknown.
Cancel a scheduled push notification
DELETE /api/v1/push/scheduled/{id}scheduled status is cancelled. Returns 404 when the id is unknown, and 409 when the push has already been sent or failed and can no longer be cancelled.
Unregister a VoIP call-push device
DELETE /api/v1/push/voip-devices/{id}?voip_token=<token> to fall back to deleting by token when the stored id is stale.
204 No Content