> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/cloud/push/devices.md).

# Devices

Every registered device that can receive push notifications.

> The registered receivers — the phones and browsers that handed your app a push token.

*Last updated 2026-09-11 · Applies to any project with the Push module enabled*

## Why it exists

Push does not go to a person, it goes to a device. The phone or browser asks Apple, Google, Mozilla or Microsoft for a token, your app passes that token to Norbix together with the user it belongs to, and from then on a campaign aimed at that user knows where to deliver. Without this step a user is invisible to push, no matter how many roles or tags they have.

## When you'd use it

* Your mobile app registers the device right after the user allows notifications.
* A web app registers the browser's subscription after the user clicks "Allow".
* One user has a phone and a tablet — two devices, both registered, both notified.

## Where to find it

Push → **Devices** · `/projects/<project>/push/devices`

<figure><img src="https://760328771-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LwSkuCpTNI_AerL8J2a%2Fuploads%2Fgit-blob-abb75291e171ac3eeb4a804999b81e252d90dc06%2Fpush-devices.jpg?alt=media" alt=""><figcaption><p>Push → Devices.</p></figcaption></figure>

{% hint style="danger" %}
The device list is currently **always empty**: the V2 gateway exposes the register-device endpoint but not a device-listing one. Devices your app registers still work for delivery — they just cannot be browsed here yet. Tracked in testing-plan area **15-push**.
{% endhint %}

## What the list will show

Each device's **Registered** date, **User**, **OS**, **Device Name**, **Brand**, **Account** and **Token**, with a checkbox per row. Device ids use the `pnd_…` prefix, e.g. `pnd_6HgqXfA2xw1sYzKp3Vbn0` registered to user `usr_2N70JWm3JWy5cIXm9CqLYn`.

## How to register a device

There is no button for this — a device is registered by your application, through the SDK or the API. Requires a role that carries `…:notifications:push:device:create` (or `…:device:create:own` for a user registering their own device).

1. Ask the operating system or the browser for permission and get the push token.
2. Call **Register device** with the token, the device's OS and the id of the user it belongs to.
3. Store nothing yourself — Norbix returns the new device id (`pnd_…`); the user can be targeted by campaigns from that moment.
4. Re-register whenever the platform hands your app a new token. Tokens are rotated by the platform and an old one silently stops working.

**What "registered" looks like:** the call returns an id (`pnd_…`), and a campaign aimed at that user starts reaching that device.

## Fields

| Field                                                                       | What it means                                                                                                        | Example                                   |
| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **userId** (required)                                                       | The user this device belongs to.                                                                                     | `usr_2N70JWm3JWy5cIXm9CqLYn`              |
| **pushDeviceDto.token** (required)                                          | The push token from the platform.                                                                                    | `fMEP0vJq...`                             |
| **pushDeviceDto.deviceOs** (required)                                       | Which platform the token came from. One of `ios`, `android`, `chrome`, `safari`, `expo` — anything else is rejected. | `android`                                 |
| **pushDeviceDto.deviceId**                                                  | Your own id for the device. Leave it out and Norbix creates one.                                                     | `pnd_6HgqXfA2xw1sYzKp3Vbn0`               |
| **pushDeviceDto.deviceName**                                                | A friendly name.                                                                                                     | `Jonas' Pixel`                            |
| **pushDeviceDto.brand** / **manufacturer** / **modelName** / **deviceType** | Hardware details, all optional, used for filtering and support.                                                      | `Google` / `Google` / `Pixel 8` / `phone` |
| **pushDeviceDto.osName** / **osVersion** / **platformApiLevel**             | Software details, all optional.                                                                                      | `Android` / `14` / `34`                   |
| **accountId**                                                               | Attach the device to an account as well as a user.                                                                   | `acc_1kP…`                                |
| **databaseIntegrationId**                                                   | Which database to store it in. Leave it out to use the project default.                                              | —                                         |

## Good to know

* **`deviceOs` is a fixed list.** `ios`, `android`, `chrome`, `safari`, `expo`. A value outside it fails with "Unsupported device OS".
* One user can have many devices, and each is notified separately. A campaign counted as one recipient can produce several messages.
* A token is not forever: platforms rotate them, and a user who reinstalls the app gets a new one. Register on every app start to stay current.
* Registering the same token twice with the same device id updates the record instead of creating a second one — pass your own `deviceId` if you want that behaviour to be reliable.
* Devices can also be targeted directly, without a user: the campaign endpoint accepts a `devices` source that takes raw tokens. See [Create a Campaign](/cloud/push/campaigns/new.md).

## Do it in code

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
await norbix.hub.notifications.registerDevice({
  projectId: '<your-project-id>',
  userId: 'usr_2N70JWm3JWy5cIXm9CqLYn',
  pushDeviceDto: {
    token: '<device-push-token>',
    deviceOs: 'android',
    deviceName: "Jonas' Pixel",
  },
});
```

{% endtab %}

{% tab title="Python" %}

```python
norbix.notifications.register_device(
    projectId="<your-project-id>",
    userId="usr_2N70JWm3JWy5cIXm9CqLYn",
    pushDeviceDto={
        "token": "<device-push-token>",
        "deviceOs": "ios",
    },
)
```

{% endtab %}

{% tab title="Go" %}

```go
var out map[string]any
err := c.Hub.Notifications.RegisterDevice(ctx, map[string]any{
	"projectId": "<your-project-id>",
	"userId":    "usr_2N70JWm3JWy5cIXm9CqLYn",
	"pushDeviceDto": map[string]any{
		"token":    "<device-push-token>",
		"deviceOs": "chrome",
	},
}, &out)
```

{% endtab %}

{% tab title=".NET" %}
Not available yet — the .NET SDK has no push client methods. Call the REST endpoint below.
{% endtab %}
{% endtabs %}

Reference: [Register Device](/sdks-and-cli/notifications/push/register-device.md) CLI: no device commands today.

## API reference

Endpoints: [Register Device](/api-reference/notifications/push/register-device.md).

## Related

[Device details](/cloud/push/devices/details.md) · [Campaigns](/cloud/push/campaigns.md) · [Integrations](/cloud/push/integrations.md) · [Push home](/cloud/push.md)
