Push notifications
Device registration, notification preferences and sending notifications. Generated from the OpenAPI specification.
Device registration, notification preferences and sending notifications.
GET /v1/push/devices
Push registrations of the signed-in user.
Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.
Response 200 OK
| Field | Type | Required | Notes |
|---|---|---|---|
devices | object[] | Yes | |
devices[].id | string (uuid) | Yes | |
devices[].deviceId | string | Yes | |
devices[].platform | "android", "ios" | Yes | |
devices[].provider | "fcm", "apns", "apns_voip" | Yes | |
devices[].appId | string | Yes | |
devices[].updatedAt | string | Yes |
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.
PUT /v1/push/devices
Register or refresh this device’s push token (idempotent; call on every token refresh).
Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
platform | "android", "ios" | Yes | |
provider | "fcm", "apns", "apns_voip" | Yes | |
token | string | Yes | pattern ^[A-Za-z0-9:_.-]{16,4096}$ |
appId | string | Yes | pattern ^[A-Za-z0-9._-]{1,200}$ |
apnsEnvironment | "sandbox", "production" | No |
Response 200 OK
| Field | Type | Required | Notes |
|---|---|---|---|
id | string (uuid) | Yes | |
deviceId | string | Yes | |
platform | "android", "ios" | Yes | |
provider | "fcm", "apns", "apns_voip" | Yes | |
appId | string | Yes | |
updatedAt | string | Yes |
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.
DELETE /v1/push/devices
Unregister this device (on sign-out); optionally only one provider.
Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
provider | "fcm", "apns", "apns_voip" | No |
Response 204 No content
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.
GET /v1/push/preferences
Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.
Response 200 OK
| Field | Type | Required | Notes |
|---|---|---|---|
calls | boolean | Yes | |
messages | boolean | Yes |
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.
PUT /v1/push/preferences
Authentication: Messaging token (Authorization: Bearer <token>), from the user’s device.
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
calls | boolean | Yes | |
messages | boolean | Yes |
Response 204 No content
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.
POST /v1/notifications
Queue a push to users’ registered devices (message or custom kinds).
Authentication: Service key with scope messaging:write (Authorization: Bearer lynk_…), from your backend only.
Request body (application/json, required)
| Field | Type | Required | Notes |
|---|---|---|---|
tenantId | string | No | pattern ^[A-Za-z0-9._@-]{1,128}$; default "default" |
userIds | string[] | Yes | at least 1 items; at most 1000 items |
kind | "message", "custom" | No | default "custom" |
title | string | No | max length 200 |
body | string | No | max length 1000 |
data | map | No | default {} |
collapseKey | string | No | max length 64 |
ttlSeconds | integer | No | ≥ 0; ≤ 2419200; default 86400 |
Response 202 Queued
| Field | Type | Required | Notes |
|---|---|---|---|
queued | integer | Yes |
Errors: 400 Invalid request · 401 Missing or invalid credentials · 403 Not permitted · 404 Not found (including resources of other projects) · 429 Rate limit or quota exceeded. Error bodies follow the error format.