---
title: "Register Fcm Token"
method: POST
path: "/api/v1/auth/fcm-token"
tags: ["auth"]
---

# Register Fcm Token

`POST /api/v1/auth/fcm-token`

## Request

- Base URL: `https://api.alert.camp` (the document declares no server; this is the origin it was published from)
- URL: `https://api.alert.camp/api/v1/auth/fcm-token`
- Auth: none declared

Register or update the user's FCM token for push notifications.

Accepts optional device metadata (device_name, platform, os_version,
app_version) alongside the FCM token.

When ``device_id`` is provided, upserts into the ``user_devices`` table
(multi-device path).  Without ``device_id``, falls back to the legacy
single-token columns on the ``users`` table.

Should be called:
- On app startup after Firebase Messaging initialization
- When the FCM token is refreshed

## Headers

- `authorization` string, nullable
- `x-dev-user-id` string, nullable
- `x-app-version` string, nullable

## Request body

- DeviceTokenRegister: Schema for registering FCM token with device metadata.
  - `fcm_token` string, required
  - `device_id` string, nullable: Stable device UUID (generated on client). None for backward compat with old mobile clients.
  - `device_name` string, nullable
  - `platform` string, nullable
  - `os_version` string, nullable
  - `app_version` string, nullable

## Response `204`

Successful Response

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/alert/apis/alertcamp.md) · [All operations](https://skmtc.dev/alert/apis/alertcamp/llms.txt) · [OpenAPI document](https://skmtc.dev/alert/apis/alertcamp/revisions/864c8c9ef833?raw)
