---
title: "Register or update a mobile push device"
method: POST
path: "/api/mobile/devices"
tags: ["Mobile"]
---

# Register or update a mobile push device

`POST /api/mobile/devices`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/mobile/devices`
- Auth: API key in cookie `luca.session_token`

Records the Expo push token for this device against the signed-in user. Registering the same device twice updates the existing row instead of adding another, so it's safe to send a token refresh on every launch. This one needs a user session, and an API key is rejected.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Request body

- MobileDeviceRegistration
  - `appEnvironment` 'development' | 'preview' | 'production', required
  - `appVersion` string
  - `deviceName` string
  - `expoPushToken` string, required
  - `installIdHash` string, required
  - `nativeBuildVersion` string
  - `platform` 'ios' | 'android', required

## Response `200`

ok

- MobileDeviceResponse
  - `appEnvironment` 'development' | 'preview' | 'production', required
  - `appVersion` string, nullable, required
  - `deviceName` string, nullable, required
  - `enabled` boolean, required
  - `id` string, uuid, required
  - `lastSeenAt` string, required
  - `nativeBuildVersion` string, nullable, required
  - `platform` 'ios' | 'android', required
  - `revokedAt` string, nullable, required

## Other responses

- `400`: validation failed
- `401`: unauthorized
- `429`: rate limited
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
