Skip to content

Mobile devices – registering and deactivating registration

Use POST and DELETE methods to connect a customer’s phone or tablet to your mobile app, so you can send push notifications and keep track of app-related consent.

POST /customermobiledevices – register or update a device

This method registers a device for a mobile app or updates its details if the device is already known. It also links the device to a customer record, and adds the consent tied to that app if the customer doesn’t have it yet.

Endpoint

POST /customermobiledevices

Host: https://api.ecdp.app

Request parameters

ParameterLocationTypeRequiredDescriptionAllowed values / notes
x-api-keyheaderstringyesAPI key for authenticationAvailable in Settings > API
Content-TypeheaderstringyesRequest content typeapplication/json
mobileApplicationIdbodyintegeryesThe mobile app this device belongs toThe ID of your app available in Settings > Mobile Apps
devicebodyobjectyesDevice detailsSee Device data below
customerbodyobjectnoCustomer identificationSee Customer data below

Device data

ParameterLocationTypeRequiredDescriptionAllowed values / notes
deviceIdbodystringyesUnique identifier for the device or app installation.Max 50 characters.
tokenbodystringyesPush token issued by Firebase Cloud Messaging (FCM).Max 200 characters.
osTypebodystringnoDevice operating system.Android, Ios, WindowsPhone, Unknown.
osVersionbodystringnoOperating system version.Max 50 characters.
deviceBrandbodystringnoDevice manufacturer.Max 50 characters.
deviceModelbodystringnoDevice model.Max 50 characters.
appVersionbodystringnoVersion of your mobile app installed on the device.Max 50 characters.
languagebodystringnoDevice or app language.Max 10 characters.

Customer data

Use these fields to link the device to a known customer. Provide at least one email, phone, or crmId to identify the customer. If you leave this out, the device is registered on its own, without a customer attached to it.

ParameterLocationTypeRequiredDescriptionAllowed values / notes
emailbodystringconditionalCustomer email address.Max 320 characters.
phonebodystringconditionalCustomer phone number.Max 20 characters, no spaces.
crmIdbodystringconditionalCustomer CRM identifier.Max 1280 characters.

A customer can have several devices registered at the same time, for example, a phone and a tablet, each with its own subscription.

Sample request

Register a device and link it to a customer

Required format: JSON

{
  "mobileApplicationId": 1,
  "device": {
    "deviceId": "device123...",
    "token": "fcm_token...",
    "osType": "Android",
    "osVersion": "14",
    "deviceBrand": "Samsung",
    "deviceModel": "Galaxy S23",
    "appVersion": "2.4.1",
    "language": "en"
  },
  "customer": {
    "email": "jane.doe@example.com",
    "phone": "48987654321",
    "crmId": "CRM-005678"
  }
}

Response codes

CodeStatusDescription
201CreatedThe registration was accepted and queued for processing
400Bad requestInvalid parameters or missing required fields
401UnauthorizedMissing or invalid API key

DELETE /customermobiledevices – deactivate a device registration

Use this method when a customer opts out of push notifications or uninstalls the app. It marks the matching device registration as inactive. If this was the customer’s last active device for that app, the related consent is revoked automatically, so you don’t need to manage that separately.

Endpoint

DELETE /customermobiledevices

Host: https://api.ecdp.app

Request parameters

ParameterLocationTypeRequiredDescriptionAllowed values / notes
x-api-keyheaderstringyesAPI key for authenticationAvailable in Settings > API
mobileApplicationIdbodyintegeryesThe mobile app the device belongs toSame value used when registering the device
deviceIdbodystringyesThe device to deactivateSame value used when registering the device

Sample request

Deactivate a device

Request format: JSON

{
  "mobileApplicationId": 1,
  "deviceId": "device123..."
}

Response codes

CodeStatusDescription
200OKDevice registration deactivated successfully
401UnauthorizedMissing or invalid API key

Validation and behavior rules

  • POST is idempotent: calling it again with the same device updates the stored token and details instead of creating a new entry.
  • POST processing happens in the background, so a 201 response confirms the request was accepted, not that it has finished processing.
  • Registering a device adds the consent tied to that mobile app, if the customer doesn’t already have it.

Reference documentation

Swagger – CustomerMobileDevices

https://api.ecdp.app/swagger/index.html