# Push
The `Push` object provides device-level [push notification](https://ably.com/docs/push.md) management, such as activating and deactivating the local device. Access it via the `push` property of a [`Realtime`](https://ably.com/docs/pub-sub/api/javascript/realtime/realtime-client.md) client instance (`realtime.push`).
#### Javascript
```
const push = realtime.push;
```
## Properties
The `Push` interface has the following properties:
| Property | Description | Type |
| --- | --- | --- |
| admin | A [`PushAdmin`](https://ably.com/docs/pub-sub/api/javascript/realtime/push-admin.md) object for managing push notifications administratively (requires the `push-admin` capability). | [PushAdmin](https://ably.com/docs/pub-sub/api/javascript/realtime/push-admin.md) |
## Activate the device
`push.activate(registerCallback?: Function, updateFailedCallback?: Function): Promise`
[Activates the device](https://ably.com/docs/push/configure/web.md#browser) for push notifications. Subsequently registers the device with Ably and stores the `deviceIdentityToken` in local storage.
### Javascript
```
await realtime.push.activate();
```
### Parameters
The `activate()` method takes the following parameters:
| Parameter | Required | Description | Type |
| --- | --- | --- | --- |
| registerCallback | Optional | A function passed to override the default implementation to register the local device for push activation. Called with the local device's [`DeviceDetails`](https://ably.com/docs/pub-sub/api/javascript/realtime/push-admin.md#DeviceDetails) and a callback of the form `callback(err, deviceDetails)`, where `err` is an `ErrorInfo` or `null` and `deviceDetails` is the registered `DeviceDetails`. | Function |
| updateFailedCallback | Optional | A callback to be invoked when the device registration fails to update. Called with an `ErrorInfo` or `null` as `updateFailedCallback(err)`. | Function |
### Returns
`Promise`
Returns a promise. The promise is fulfilled when the device has been activated, or rejected with an [`ErrorInfo`](https://ably.com/docs/pub-sub/api/javascript/realtime/realtime-client.md#errorinfo) object.
## Deactivate the device
`push.deactivate(deregisterCallback?: Function): Promise`
Deactivates the device from receiving push notifications.
### Javascript
```
await realtime.push.deactivate();
```
### Parameters
The `deactivate()` method takes the following parameters:
| Parameter | Required | Description | Type |
| --- | --- | --- | --- |
| deregisterCallback | Optional | A function passed to override the default implementation to deregister the local device for push activation. Called with the local device's [`DeviceDetails`](https://ably.com/docs/pub-sub/api/javascript/realtime/push-admin.md#DeviceDetails) and a callback of the form `callback(err, deviceId)`, where `err` is an `ErrorInfo` or `null` and `deviceId` is the deregistered device's ID string. | Function |
### Returns
`Promise`
Returns a promise. The promise is fulfilled when the device has been deactivated, or rejected with an [`ErrorInfo`](https://ably.com/docs/pub-sub/api/javascript/realtime/realtime-client.md#errorinfo) object.
## LocalDevice
A `LocalDevice` represents the current device as registered for push notifications, exposing the identity token and secret it uses to authenticate itself with Ably. Access it by calling `await realtime.getDevice()`.
### Properties
| Property | Description | Type |
| --- | --- | --- |
| id | A unique ID generated by the device. | String |
| deviceSecret | A unique device secret generated by the Ably SDK. | String |
| deviceIdentityToken | A unique identity token the device uses to authenticate itself with Ably. Not present until device activation has completed. | String or Undefined |
### List subscriptions for the local device
`localDevice.listSubscriptions(): Promise>`
Retrieves push subscriptions active for the local device.
#### Javascript
```
const device = await realtime.getDevice();
const subs = await device.listSubscriptions();
```
#### Returns
`Promise>`
Returns a promise. The promise is fulfilled with a [`PaginatedResult`](https://ably.com/docs/pub-sub/api/javascript/realtime/realtime-client.md#PaginatedResult) containing an array of `PushChannelSubscription` objects for each push channel subscription active for the local device, or rejected with an [`ErrorInfo`](https://ably.com/docs/pub-sub/api/javascript/realtime/realtime-client.md#errorinfo) object.
| Property | Description | Type |
| --- | --- | --- |
| channel | The channel that this push notification subscription is associated with. | String |
| deviceId | The device with this identifier is linked to this channel subscription. When present, `clientId` is never present. | String or Undefined |
| clientId | Devices with this [client identifier](https://ably.com/docs/auth/identified-clients.md) are included in this channel subscription. When present, `deviceId` is never present. | String or Undefined |
## Related Topics
- [PushChannel](https://ably.com/docs/pub-sub/api/javascript/realtime/push-channel.md): API reference for the PushChannel interface in the Ably Pub/Sub JavaScript Realtime SDK.
- [PushAdmin](https://ably.com/docs/pub-sub/api/javascript/realtime/push-admin.md): API reference for the Push admin (PushAdmin) interface in the Ably Pub/Sub JavaScript Realtime SDK.
## Documentation Index
To discover additional Ably documentation:
1. Fetch [llms.txt](https://ably.com/llms.txt) for the canonical list of available pages.
2. Identify relevant URLs from that index.
3. Fetch target pages as needed.
Avoid using assumed or outdated documentation paths.