---
title: "Update a device registration"
method: PATCH
path: "/push/deviceRegistrations/{device_id}"
tags: ["Push"]
---

# Update a device registration

`PATCH /push/deviceRegistrations/{device_id}`

Specific attributes of an existing registration can be updated. Only clientId, metadata and push.recipient are mutable.

## Path parameters

- `device_id` string, required

## Request body

- DeviceDetails
  - `id` string — Unique identifier for the device generated by the device itself.
  - `clientId` string — Optional trusted client identifier for the device.
  - `formFactor` 'phone' | 'tablet' | 'desktop' | 'tv' | 'watch' | 'car' | 'embedded' — Form factor of the push device.
  - `metadata` object — Optional metadata object for this device. The metadata for a device may only be set by clients with push-admin privileges and will be used more extensively in the future with smart notifications.
  - `platform` 'ios' | 'android' | 'browser' — Platform of the push device.
  - `deviceSecret` string — Secret value for the device.
  - `push.recipient` Recipient — Push recipient details for a device.
    - `transportType` 'apns' | 'fcm' | 'gcm' | 'web' — Defines which push platform is being used.
    - `deviceToken` string — when using APNs, specifies the required device token.
    - `registrationToken` string — when using GCM or FCM, specifies the required registration token.
    - `encryptionKey` object — when using web push, specifies the required encryptionKey.
    - `clientId` string — Client ID of recipient
    - `deviceId` string — Client ID of recipient
  - `push.state` 'Active' | 'Failing' | 'Failed' — the current state of the push device.

## Response `2XX`

OK

- DeviceDetails
  - `id` string — Unique identifier for the device generated by the device itself.
  - `clientId` string — Optional trusted client identifier for the device.
  - `formFactor` 'phone' | 'tablet' | 'desktop' | 'tv' | 'watch' | 'car' | 'embedded' — Form factor of the push device.
  - `metadata` object — Optional metadata object for this device. The metadata for a device may only be set by clients with push-admin privileges and will be used more extensively in the future with smart notifications.
  - `platform` 'ios' | 'android' | 'browser' — Platform of the push device.
  - `deviceSecret` string — Secret value for the device.
  - `push.recipient` Recipient — Push recipient details for a device.
    - `transportType` 'apns' | 'fcm' | 'gcm' | 'web' — Defines which push platform is being used.
    - `deviceToken` string — when using APNs, specifies the required device token.
    - `registrationToken` string — when using GCM or FCM, specifies the required registration token.
    - `encryptionKey` object — when using web push, specifies the required encryptionKey.
    - `clientId` string — Client ID of recipient
    - `deviceId` string — Client ID of recipient
  - `push.state` 'Active' | 'Failing' | 'Failed' — the current state of the push device.

## Other responses

- `default` — Error

## Changes

- **2024-06-24** (v1) `d9cf7e90bb58` — 6 warning, 24 info
  - added the new `browser` enum value to the `platform` response property for the response status `2XX` (media type: application/json)
  - added the new `browser` enum value to the `platform` response property for the response status `2XX` (media type: application/x-msgpack)
  - added the new `browser` enum value to the `platform` response property for the response status `2XX` (media type: text/html)
  - added the new `web` enum value to the `push.recipient/transportType` response property for the response status `2XX` (media type: application/json)
  - …26 more

[Change history](https://skmtc.dev/ably/apis/platform-api/changes/push/deviceRegistrations/:device_id/patch.md)

---

[API](https://skmtc.dev/ably/apis/platform-api.md) · [All operations](https://skmtc.dev/ably/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ably/platform-api/revisions/d9cf7e90bb58/schema)
