For the complete documentation index, see llms.txt. This page is also available as Markdown.

Devices API

Overview of mobile devices API methods

Register Device

POST https://api.norbix.ai/:version/notifications/push/devices

Registers a device without a token. Devices without a token won't receive push notifications.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

Name
Type
Description

userId

string

The ID of a user.

timeZone

string

The timezone of a device in a tz database format.

meta

object

Key-value pair (string: string) object for custom data.

{
    Result: ""
}
var client = new NorbixClient(apiKey, projectId);
var pushService = new NorbixPushService(client);

var response = await pushService.RegisterDeviceAsync(
    new RegisterDeviceRequest
    {
        UserId = Guid.parse("{USER_ID}"),
        TimeZone = "Etc/UTC",
        Meta = new Dictionary<string, string>
        {
            { "Os", "Android" }            
        }
    }
use Norbix\NorbixClient;
use Norbix\NorbixPushNotification;

class NorbixService
{
    protected NorbixPushNotification $norbixPushNotification;

    public function __construct()
    {
        $secretKey = '{YOUR_SECRET_KEY}';
        $projectId = '{YOUR_PROJECT_ID}';

        $client = new NorbixClient($secretKey, $projectId);
        $norbixPushNotification = new NorbixPushNotification($client);
    }
    
    public function registerDevice()
    {
        $responseData = $this->norbixPushNotification->registerDevice([
            'userId' => '{USER_ID}',
            'timeZone' => 'Etc/UTC',
            'meta' => [
                'Brand' => 'Apple'
            ]
    }
    
}

Register Expo Token

POST https://api.norbix.ai/:version/notifications/push/token/expo

Registers a device with an Expo token and creates a device if not yet created.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

Name
Type
Description

token

string

Token of a device provided by the Expo.

deviceId

string

The ID of a device. If not provided, a new device will be added.

userId

string

The ID of a user.

timeZone

string

The timezone of a device in a tz database format.

meta

object

Key-value pair (string: string) object for custom data.

Get Device

GET https://api.norbix.ai/:version/notifications/push/devices/:id

Gets a device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device to get.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Get Devices

GET https://api.norbix.ai/:version/notifications/push/devices

Gets many devices.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Delete Device

DELETE https://api.norbix.ai/:version/notifications/push/devices/:id

Deletes a particular device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device to delete.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Delete Device Token

DELETE https://api.norbix.ai/:version/notifications/push/devices/:id/token

Deletes a token of a particular device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Update Device Meta

PATCH https://api.norbix.ai/:version/notifications/push/devices/:id/metadata

Updates a meta-information of a particular device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device to update.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

Name
Type
Description

meta

string

Key-value pair (string: string) object of custom data.

Update Device Timezone

PATCH https://api.norbix.ai/:version/notifications/push/devices/:id/timezone

Updates a timezone of a particular device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device to update.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

Name
Type
Description

timezone

string

The timezone of a device in a tz database format.

Update Device User

PATCH https://api.norbix.ai/:version/notifications/push/devices/:id/timezone

Updates a user of a particular device.

Path Parameters

Name
Type
Description

version

string

The version of the API endpoint. Current latest v1.

id

string

The ID of a device to update.

Headers

Name
Type
Description

Authorization

string

Your project's secret key.

x-cm-projectid

string

Your project's ID. Can be passed as a query parameter.

Request Body

Name
Type
Description

userId

string

The ID of a new user.

Last updated