Subscribe a device to a channel

POST /push/channelSubscriptions

Subscribe either a single device or all devices associated with a client ID to receive push notifications from messages sent to a channel.

Body object

One of:

Responses

POST /push/channelSubscriptions
curl \
 -X POST https://rest.ably.io/push/channelSubscriptions \
 -H "Content-Type: application/json" \
 -d '{"channel":"my:channel","clientId":"myClientId"}'
Request example
{
  "channel": "my:channel",
  "clientId": "myClientId"
}
Request examples
{
  "channel": "string",
  "deviceId": "string"
}
{
  "channel": "string",
  "clientId": "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"
}
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"
}