Update a device registration
Specific attributes of an existing registration can be updated. Only clientId, metadata and push.recipient are mutable.
Path parameters
-
device_id
string Required Device's ID.
Body
-
id
string Unique identifier for the device generated by the device itself.
-
clientId
string Optional trusted client identifier for the device.
-
formFactor
string Form factor of the push device.
Values are
phone
,tablet
,desktop
,tv
,watch
,car
, orembedded
. -
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
string Platform of the push device.
Values are
ios
orandroid
. -
deviceSecret
string Secret value for the device.
-
push.recipient
object Push recipient details for a device.
PATCH
/push/deviceRegistrations/{device_id}
curl \
-X PATCH https://rest.ably.io/push/deviceRegistrations/{device_id} \
-H "Content-Type: application/json" \
-d '{"id":"string","clientId":"string","formFactor":"phone","metadata":{},"platform":"ios","deviceSecret":"string","push.recipient":{"transportType":"apns","deviceToken":"string","registrationToken":"string","clientId":"string","deviceId":"string"}}'
Request example
{
"id": "string",
"clientId": "string",
"formFactor": "phone",
"metadata": {},
"platform": "ios",
"deviceSecret": "string",
"push.recipient": {
"transportType": "apns",
"deviceToken": "string",
"registrationToken": "string",
"clientId": "string",
"deviceId": "string"
}
}
Request examples
{
"id": "string",
"clientId": "string",
"formFactor": "phone",
"metadata": {},
"platform": "ios",
"deviceSecret": "string",
"push.recipient": {
"transportType": "apns",
"deviceToken": "string",
"registrationToken": "string",
"clientId": "string",
"deviceId": "string"
}
}
Response examples (2XX)
{
"id": "string",
"clientId": "string",
"formFactor": "phone",
"metadata": {},
"platform": "ios",
"deviceSecret": "string",
"push.recipient": {
"transportType": "apns",
"deviceToken": "string",
"registrationToken": "string"
},
"push.state": "Active"
}
Response examples (2XX)
{
"id": "string",
"clientId": "string",
"formFactor": "phone",
"metadata": {},
"platform": "ios",
"deviceSecret": "string",
"push.recipient": {
"transportType": "apns",
"deviceToken": "string",
"registrationToken": "string"
},
"push.state": "Active"
}
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string
# Payload
{
"message": "string",
"code": 42,
"statusCode": 42,
"href": "string",
"serverId": "string"
}
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string
# Payload
{
"message": "string",
"code": 42,
"statusCode": 42,
"href": "string",
"serverId": "string"
}