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
| Parameter | Location | Type | Required | Description | Allowed values / notes |
| x-api-key | header | string | yes | API key for authentication | Available in Settings > API |
| Content-Type | header | string | yes | Request content type | application/json |
| mobileApplicationId | body | integer | yes | The mobile app this device belongs to | The ID of your app available in Settings > Mobile Apps |
| device | body | object | yes | Device details | See Device data below |
| customer | body | object | no | Customer identification | See Customer data below |
Device data
| Parameter | Location | Type | Required | Description | Allowed values / notes |
| deviceId | body | string | yes | Unique identifier for the device or app installation. | Max 50 characters. |
| token | body | string | yes | Push token issued by Firebase Cloud Messaging (FCM). | Max 200 characters. |
| osType | body | string | no | Device operating system. | Android, Ios, WindowsPhone, Unknown. |
| osVersion | body | string | no | Operating system version. | Max 50 characters. |
| deviceBrand | body | string | no | Device manufacturer. | Max 50 characters. |
| deviceModel | body | string | no | Device model. | Max 50 characters. |
| appVersion | body | string | no | Version of your mobile app installed on the device. | Max 50 characters. |
| language | body | string | no | Device 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.
| Parameter | Location | Type | Required | Description | Allowed values / notes |
| body | string | conditional | Customer email address. | Max 320 characters. | |
| phone | body | string | conditional | Customer phone number. | Max 20 characters, no spaces. |
| crmId | body | string | conditional | Customer 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
| Code | Status | Description |
| 201 | Created | The registration was accepted and queued for processing |
| 400 | Bad request | Invalid parameters or missing required fields |
| 401 | Unauthorized | Missing 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
| Parameter | Location | Type | Required | Description | Allowed values / notes |
| x-api-key | header | string | yes | API key for authentication | Available in Settings > API |
| mobileApplicationId | body | integer | yes | The mobile app the device belongs to | Same value used when registering the device |
| deviceId | body | string | yes | The device to deactivate | Same value used when registering the device |
Sample request
Deactivate a device
Request format: JSON
{
"mobileApplicationId": 1,
"deviceId": "device123..."
}Response codes
| Code | Status | Description |
| 200 | OK | Device registration deactivated successfully |
| 401 | Unauthorized | Missing 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