Skip to main content
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 passing app_install_id retires the previous token on a reinstall.
cURL
TypeScript
201
Save the returned 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
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). 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
Page the log with ?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 the issues 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:
The same 422 shape answers a send with neither 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:
The identification token an OS hands you on reinstall is new every time — re-register rather than updating a stale id, and 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 with send_at, and the device wake telemetry your client reports after each push wake. Read one category.
GET /api/v1/push/categories/{id}
A category record carries the wire-bound identifier your client matches on, the optional sound and its action buttons.
Create categories. 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.
A transactional category with no actions and no sound:
Read a queued scheduled send.
GET /api/v1/push/scheduled/{id}
Returns the full queued row, payload included, so you can inspect what will go out and at which send_at before the scheduler dispatches it.
Cancel it while still queued. 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).
Report wake telemetry. Your client calls 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.
Test your push configuration. 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.
When every device accepts, the envelope reads "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


List push notification categories

GET /api/v1/push/categories
List the APNs / FCM categories defined for this tenant, newest first, returning at most 200 entries with their identifiers, sounds and action buttons. Use it to see which interactive categories are configured before naming an identifier on a push send.

Get push notification category by ID

GET /api/v1/push/categories/{id}
Fetch one push notification category by its generated id, including its wire-bound identifier, optional sound and action buttons. Use it to confirm the exact record a category id resolves to before deleting or before wiring it into a push send.
string
required
—

Get web push configuration

GET /api/v1/push/config
Return the public Web Push configuration a browser needs to subscribe: the VAPID public key and whether web push is enabled for this deployment. The VAPID private key is never returned. Call it before requesting a browser PushSubscription, or to re-subscribe after a VAPID key rotation.

List registered device tokens

GET /api/v1/push/device-tokens
List the push device tokens registered for this tenant, newest first, optionally filtered to a single user with the user_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-activities
List the iOS ActivityKit Live Activities tracked for this tenant, newest first. Each row carries the activity token, type, current content state, status and lifecycle timestamps (started, updated, ended). Use it to see which live, lock-screen experiences are active so they can be updated or ended. Capped at 200 rows.

List sent push notifications

GET /api/v1/push/notifications
List push notifications sent for this tenant, newest first, with their delivery status, per-notification transport and the delivered / opened timestamps and any error. Page through the log with the optional cursor (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/scheduled
List this tenant’s push notifications queued for a future send, soonest send_at first, optionally filtered by status (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}
Retrieve a single scheduled push by id, including its full platform-agnostic payload, target 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.
string
required
Scheduled push id.

Summarize device push telemetry

GET /api/v1/push/telemetry/summary
Return aggregated device push-wake telemetry grouped by user and platform: sample count, median/min/max battery level at last push, average wake count and median delivery latency. Use it to power the dashboard’s battery-impact view and confirm background push delivery is not draining devices. Non-admin callers see only their own telemetry; admins and owners may pass an explicit user_id.

List registered VoIP call-push devices

GET /api/v1/push/voip-devices
Lists VoIP/CallKit device tokens registered for this tenant, newest-seen first, optionally filtered to a single user. Includes revoked devices (revoked_at set) so an operator can see why a device stopped ringing. Capped at 200 rows.
string
Filter the list to a single user’s devices.

Clear a user’s push badge count

POST /api/v1/push/badge/clear
Reset the unread app-icon badge for one user to zero across their registered iOS devices. By default it also fires a silent background push (badge: 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/categories
Per-tenant APNs / FCM notification category. The identifier 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-tokens
Register (or refresh) a device so it can receive push notifications. Supply the native APNs / FCM token for ios / 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-activities
Start an iOS ActivityKit Live Activity and send its initial push through APNs. Provide the activity_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}/ack
Record a delivery or open acknowledgement from a client SDK for one push notification, setting its delivered_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.
string
required
—

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/register
Backwards-compatible alias for POST /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/send
Send a push notification to one or more targeted devices, fanning out across iOS (APNs), Android (FCM) and Web Push in a single call. Target by explicit user_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/telemetry
Mobile / web clients call this every ~15min after a push wake to report battery_pct + wake_count + delivery_latency_ms. The dashboard surfaces the aggregate so operators see we don’t drain (UCAAS-GAP-01).

Send a push configuration test

POST /api/v1/push/test-send
Fire a single fixed-shape test notification to every enabled device token owned by the authenticated operator to validate FCM / APNs / VAPID credentials end-to-end. It never targets a peer and never broadcasts, and it is not recorded as a tracked send so it does not pollute campaign stats. Always returns 200 with a per-token verdict (including the provider that was exercised) so a single failing device does not mask the others.

Register a VoIP (PushKit) / high-priority FCM call token

POST /api/v1/push/voip-devices
Register (or refresh) the device token used ONLY for inbound-call CallKit/ConnectionService pushes — separate from the general marketing/notification device tokens registered at POST /push/device-tokens. Re-registering the same token un-revokes it and updates last-seen. Call it once the client obtains a PushKit VoIP token (iOS) or the call-channel FCM token (Android).
string
Agent/user id this device belongs to; defaults to the authenticated user when omitted.
string (enum: ios|android)
required
—
string
required
iOS: the raw PushKit (PKPushRegistry) token. Android: the FCM registration token used for the high-priority call channel.
string
iOS app bundle id — the APNs apns-topic for a VoIP push is &lt;bundle_id&gt;.voip. Falls back to the server-configured bundle id when omitted.

Update a Live Activity

PUT /api/v1/push/live-activities/{id}
Push a new 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.
string
required
—

Enable or disable a device token

PATCH /api/v1/push/device-tokens/{id}
Toggle push delivery for a single device without permanently deleting its token by sending 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.
string
required
—

Delete push notification category

DELETE /api/v1/push/categories/{id}
Delete one push notification category by its generated id. Identifier reuse is the supported update pattern — delete, then recreate — because the identifier is wire-bound on the iOS / Android client. Returns an empty 204; an unknown id yields a 404.
string
required
—
Response: 204 No Content

Delete a device token

DELETE /api/v1/push/device-tokens/{id}
Unregister a device token so it no longer receives pushes — for example when a user signs out or removes a device. Identified by the token’s Orbit id. Returns 204 No Content on success and 404 when the token does not exist in this tenant.
string
required
—
Response: 204 No Content

End a Live Activity

DELETE /api/v1/push/live-activities/{id}
End a running Live Activity and send the final ActivityKit 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.
string
required
—

Cancel a scheduled push notification

DELETE /api/v1/push/scheduled/{id}
Cancel a push notification still queued for a future send, before the scheduler dispatches it. This is a guarded status change, not a hard delete: only a push still in 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.
string
required
Scheduled push id.

Unregister a VoIP call-push device

DELETE /api/v1/push/voip-devices/{id}
Removes a VoIP/CallKit device token so it no longer receives inbound-call pushes — for example on sign-out. Returns 204 on success, 404 when the id is unknown in this tenant. Pass ?voip_token=&lt;token&gt; to fall back to deleting by token when the stored id is stale.
string
required
—
Response: 204 No Content

Worked sequences

The page above trims every operation past the fifteenth to cURL plus TypeScript. This section renders the first hero flow(s) past the cut in the full six-language group, so the operation a pipeline reaches next is copy-paste complete.

Register a device token (alias)

Send a push notification