Register a push device
/push/devicesStore an FCM registration token so the user can receive push notifications for new chat messages. Registration is idempotent on token, so re-sending the same token does not create duplicates. If the token already belongs to another user (device hand-off or account switch), ownership moves to the authenticated user. A previously disabled token is re-enabled.
| Auth | Login required |
|---|
Request body
tokenstringrequiredFCM registration token.
platformstringrequiredOne of IOS / ANDROID / WEB.
localestringLocale for notification text (e.g. ja / en). Falls back to the user's language settings when omitted.
Notes
Devices are scoped to the app (OAuth client) that registered them. Devices registered by other apps are neither listed nor deletable.
Revoking the app's authorization also deletes the devices it registered, so push notifications stop.
When FCM reports a token as unregistered, the device is automatically excluded from future deliveries.
Response
| Field | Type | Description |
|---|---|---|
id | string | Device ID, used when unregistering. |
tokenMasked | string | Only the tail of the token. The full token is never returned. |
platform | string | IOS / ANDROID / WEB. |
clientId | string | null | OAuth client ID that registered the device. |
locale | string | null | Locale for notification text. |
lastUsedAt | string | null | Last successful delivery (ISO 8601). |
createdAt | string | Created at (ISO 8601). |
updatedAt | string | Updated at (ISO 8601). |
curl https://api.4s.link/push/devices \-X POST \-H "Authorization: Bearer 4s_at_..." \-H "Content-Type: application/json" \-d '{"token": "fcm-registration-token-...","platform": "IOS","locale": "ja"}'
{"id": "b7c1a2d3-...","tokenMasked": "...9fA2xQ","platform": "IOS","clientId": "a1b2c3d4-...","locale": "ja","lastUsedAt": null,"createdAt": "2026-08-18T09:00:00.000Z","updatedAt": "2026-08-18T09:00:00.000Z"}