---
source_url: https://www.pubnub.com/docs/sdks/rest-api/manage-device-registrations-apns-http-2
title: Manage device registrations (APNS HTTP/2)
---

# Manage device registrations (APNS HTTP/2)

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Add/remove/list channels in a single API call. If the `add` and `remove` query parameters are not present, the operation lists channels registered for the device.

Returns array with two elements:

* Array Element 0 - Integer – 1 or 0, where 1 is success, and 0 is error.
* Array Element 1 - String – Description of the success or error, if available. e.g "Modified Channels"

| Path Parameters |
| --- |
| `sub_key`string—**REQUIRED**Your app's subscribe key from Admin Portal. |
| `devices-apns2`string—**REQUIRED**ID/Token of the device.Example: A332C23D |

| Query Parameters |
| --- |
| `add`stringList of channels for the device's inclusion in push registration. By using comma delimiters, multiple channels can be added e.g. (ch1, ch2, ch3), resulting in the addition of three channels.Example: myChannel |
| `remove`stringName of the channel for which the device will no longer recieve push notifications. By using comma delimiters, multiple channels can be added e.g. (ch1, ch2, ch3), resulting in the removal of three channels.Example: myChannel |
| `environment`string—**REQUIRED**Possible values: [development, production]Environment of the mobile application.Example: development |
| `topic`string—**REQUIRED**Bundle ID of the mobile application.Example: com.my.app.Application |
| `start`stringStarting channel for pagination. Use the last channel from the previous page request. |
| `count`integerNumber of channels to return for pagination. Max of 1000 tokens at a time. Defaults to 500. |
| `uuid`string—**REQUIRED**A UTF-8 encoded string of up to 92 characters used to identify the client.Example: myUniqueUserId |
| `auth`stringString which is either the auth key (Access Manager legacy) or a valid token (Access Manager) used to authorize the operation if access control is enabled.Example: myAuthKey |
| `signature`stringSignature used to verify that the request was signed with the secret key associated with the subscriber key.If Access Manager is enabled, either a valid authorization token or a signature are required.See Access Manager documentation for details on how to compute the signature. |
| `timestamp`integerUnix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.Required if signature parameter is supplied. |

| Responses |
| --- |
| `200`OKSchema — OPTIONAL undefined[] | Schema—**OPTIONAL** | undefined[] |
| Schema—**OPTIONAL** |
| undefined[] |
| `400`Bad RequestSchema — OPTIONAL undefined | Schema—**OPTIONAL** | undefined |
| Schema—**OPTIONAL** |
| undefined |

sub_key
*
Type:
string
Your app's subscribe key from
[Admin Portal](https://admin.pubnub.com)
.
devices-apns2
*
Type:
string
ID/Token of the device.
add
Type:
string
List of channels for the device's inclusion in push registration. By using comma delimiters, multiple channels can be added e.g. (ch1, ch2, ch3), resulting in the addition of three channels.
remove
Type:
string
Name of the channel for which the device will no longer recieve push notifications. By using comma delimiters, multiple channels can be added e.g. (ch1, ch2, ch3), resulting in the removal of three channels.
environment
*
Type:
string
Environment of the mobile application.
topic
*
Type:
string
Bundle ID of the mobile application.
start
Type:
string
Starting channel for pagination. Use the last channel from the previous page request.
count
Type:
integer
Number of channels to return for pagination. Max of 1000 tokens at a time. Defaults to 500.
uuid
*
Type:
string
A UTF-8 encoded string of up to 92 characters used to
[identify the client](https://www.pubnub.com/docs/architecture/core-concepts.md)
.
auth
Type:
string
String which is either the auth key (Access Manager legacy) or a valid token (
[Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md)
) used to authorize the operation if access control is enabled.
signature
Type:
string
Signature used to verify that the request was signed with the secret key associated with the subscriber key.

If Access Manager is enabled, either a valid authorization token or a signature are required.

See Access Manager documentation for details on how to compute the signature.
timestamp
Type:
integer
Unix epoch timestamp used as a nonce for signature computation. Must have no more than ± 60 seconds offset from NTP.

Required if
signature
parameter is supplied.
message
Type:
string
Example:
"Invalid Subscribe Key"
error
Type:
boolean
Example:
true
service
Type:
string
Example:
"Access Manager"
status
Type:
integer
Example:
400
