notifications
POST /v1/me/push-devices
Register (or re-register) this phone for alerts.
Authentication
Send an API key as a bearer token. This endpoint checks no specific permission, so any key for your organisation can call it.
Where your organisation id goes
This endpoint takes org_id as a query parameter. Leave it out and the call covers your whole tenancy subtree; send it to narrow the call to one organisation.
Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/me/push-devices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "installation_id": <string>, "token": <string>, "platform": <string<ios, android>> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Called by the app after the customer allows notifications, and again whenever the push token rotates. The token is PROVED first with a silent dry run at the push service, so the phone is created already verified and a token the service refuses is refused here (422) instead of being stored to fail on a real alert. One row per install: the same installation_id updates its row (200); a new install creates one (201). A token another person in this organisation held on the same phone moves to the caller.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
org_id (query) | string | No | The organization to act on, as for the other notification endpoints. Omitted resolves to your own only when you belong to exactly one organisation. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
installation_id | string | Yes | A random id the app generates once per install and keeps. |
token | string | Yes | The push token the phone's operating system issued to the app. |
platform | string<ios, android> | Yes | — |
device_name | string | No | — |
os_version | string | No | — |
app_version | string | No | — |
locale | string | No | — |
time_zone | string | No | An IANA zone |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
connection_id | string | Yes | — |
installation_id | string | Yes | — |
platform | string<ios, android> | Yes | — |
device_name | string | No | — |
os_version | string | No | — |
app_version | string | No | — |
locale | string | No | — |
time_zone | string | No | — |
quiet_enabled | boolean | Yes | — |
quiet_start | integer | Yes | — |
quiet_end | integer | Yes | — |
health | string | Yes | — |
last_delivery_at | string | No | — |
last_seen_at | string | Yes | — |
created_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 422