---
title: "Upsert FCM token"
method: PUT
path: "/users/user_private_data/firebase_cloud_messaging_token/v1"
tags: ["/users"]
---

# Upsert FCM token

`PUT /users/user_private_data/firebase_cloud_messaging_token/v1`

Upserts a Firebase Cloud Messaging token for the caller. Dedupes on token; if token exists, updates last_used_timestamp. | (FirebaseCloudMessagingTokenClientCreate1) -> (UserPrivateData1)

## Request body

- FirebaseCloudMessagingTokenClientCreate1
  - `firebase_cloud_messaging_token` string, required
  - `platform` 'android' | 'ios' | 'web'

## Response `200`

Successful Response

- UserPrivateData1
  - `schema_version` 1, required
  - `created_at_timestamp` string, date-time, required
  - `user_id` string, required — Must be a string starting with `user_`
  - `name` string, nullable
  - `primary_email_address` string, email, nullable
  - `phone_number` string, phone, nullable
  - `firebase_cloud_messaging_token_data` FirebaseCloudMessagingTokenData1[]
    - `firebase_cloud_messaging_token` string, required
    - `platform` 'android' | 'ios' | 'web'
    - `last_used_timestamp` string, date-time, required
  - `_id` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/chrt/apis/chrt-fastapi.md) · [All operations](https://skmtc.dev/chrt/apis/chrt-fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chrt/chrt-fastapi/revisions/ea04e157edb3/schema)
