Register Device

Registering a device to receive Push Notification messages.

In order to send a Push Notification message to a device, the device has to register to receive messages. Device registration is done by creating a registration record inside the database Devices built-in collection. Registration is done by making a request to the following endpoint:


Registration supports the following parameters:

AppTypeApp platform type (A – Android, I – iOS). Required.
tokenUnique app instance identifier. Required.
deviceIdUnique device identifier. Required .
X-Appery-App-IdUnique identifier of app. The app ID can be found in the App Builder URL. For example:***e51a...ad9***/edit. Required.
custom_param_nameName of custom field in _devices table.
custom_param_valueValue of custom_param_name field.
channelsList of channelId channel identifiers.

Error responses

The endpoint might respond with the following error messages:

HTTP StatusCodeDescription
400PNDR002App ID is not specified
400PNDR007Device ID must be a string
400PNDR008Token must be a string
400PNDR009Channels must be an array
400PNDR0010Channel length can’t be more than 256 symbols
400PNDR0011Type must be a string
400PNDR0012Empty token/registrationID
400PNDR0013Type must be A or I
400PNDR0014Device ID can’t be more than 256 symbols
400PNDR0015Project GUID: not found
400PNDR0016Token can’t be more than 256 symbols
400PNDR0019Channel can’t be empty
400PNDR0022Empty deviceID
400PNDR960Specified brand is not valid

You can provide values for other predefined or custom fields as well:

curl -X POST 
  -H "X-Appery-App-ID: e51f973c-aad9-4102-9f39-349c25264277" 
  -H "Content-Type: application/json" 
  -d '{
The server returns an HTTP 200 OK status and the registered device identifier, if the device was successfully registered.


deviceId and token information

The deviceId and token parameters are automatically generated device-side. These values can’t be found anywhere except in the devices collection of the Database. Information about the device (including the deviceId and token parameters) where the app is installed, will be saved in the devices collection of the selected database as soon as the device is running the app.