# Mobile apps contact information management API

Push device registration (pushRegistrationId) is one of the ways to contact a specific person. One person can have one or more push devices. A single push device always belongs to one person. *pushRegistrationID* of a device is a unique identifier for all people.

The push device data is mostly managed by the mobile SDKs for [Android](https://github.com/infobip/mobile-messaging-sdk-android), [iOS](https://github.com/infobip/mobile-messaging-sdk-ios), [Cordova](https://github.com/infobip/mobile-messaging-cordova-plugin), and [React Native](https://github.com/infobip/mobile-messaging-react-native-plugin/). Some device data is gathered by the SDK automatically, such as the application version or device model. Such data is marked as read-only in the model below.

There are also other types of data such as Primary flag or Additional data attributes which can be managed both through the SDK and via HTTP APIs.

With Mobile Apps contact information management API, you can:

- Get push device registration
- Update push device registration
- Personalize
- Depersonalize

NOTE  
The APPLICATION CODE should be provided for each HTTP request via the AppCode header. You can find a specific application code in the [Create Mobile Application Profile](https://www.infobip.com/docs/get-started/mobile-application-profile#copy-application-code-create-and-enable-a-mobile-application-profile) section.

## Model

**Body parameters**

| Parameter name | Type | Description |
| --- | --- | --- |
| registrationId | string(read-only) | Registration identifier of a particular push device registration. |
| applicationId | string(read-only) | Internal identifier of a push application configuration. |
| isPrimary | boolean | Set totrueif this device is a primary user device among other devices. |
| systemData | system data | Set of push-specific attributes, see System data. |
| additionalData | list of custom attributes | Custom attributes set for a device, see Additional data. |
  
**System data**

| Parameter name | Type | Description |
| --- | --- | --- |
| registrationEnabled | boolean | State of the device registration. |
| notificationsEnabled | boolean (read-only) | Set totrueif notifications are enabled on a device. |
| sdkVersion | string (read-only) | SDK version that is running on a device. |
| appVersion | string (read-only) | The version of the application which SDK is embedded into. |
| os | string (read-only) | The operating system type can beAndroidoriOS. |
| osVersion | string (read-only) | The version of the operating system. |
| deviceManufacturer | string (read-only) | The manufacturer of the device as detected by the SDK. |
| deviceModel | string (read-only) | The model of the device. |
| deviceSecure | boolean (read-only) | Set totrueif the device has any type of secure screen lock set up. |
| osLanguage | string (read-only) | Identifier of the language used on a device. |
| deviceTimezoneOffset | string (read-only) | UTC-related time zone offset that identifies the current time zone of a device. |
| deviceName | string (read-only) | The name of the device as configured by the user. |
  
**Additional data**

Additional data specifies a list of custom values assigned to a device.

| Attribute fields | Type | Description | Limits |
| --- | --- | --- | --- |
| name | string | Name of the attribute | 256 characters max |
| value | string, number, boolean, date | Value of the attribute | Max value for number is 9223372036854775807. Max value for a string is 4096 characters. The date is YYYY-MM-DD. |

## Get Push Device Registration

Refer to the [Get Push Device Registration](https://www.infobip.com/docs/api/customer-engagement/people/get-push-device-registration) method to get the device data from the platform.

## Update Push Device Registration

Refer to the [Update Push Device Registration](https://www.infobip.com/docs/api/customer-engagement/people/update-push-device-registration) method to update the device data on the platform.

## Personalize

Each person can have a **phone number**, **email,** or **external ID**. These fields are unique identifiers of a person on the Infobip platform and provide the capability to <apidocslink href="customer-engagement/people/personalize-push-instance">personalize</apidocslink> any push device registration with a person profile. The platform provides data grouping functions based on these parameters, meaning devices personalized with the same phone number or/and email will be collected under a single person.

The following query parameters are supported:

**Query parameters**

| Query parameter | Type | Description |
| --- | --- | --- |
| forceDepersonalize | boolean | Set this parameter totrueif you want previous personalization to always be reset. Do not use this parameter if you want to know when there’s an attempt to personalize already personalized registration. |
  
**Body parameters**

| Body parameter | Type | Description |
| --- | --- | --- |
| identity | An object that contains anexternalId,phoneNumber,and/oremail | Unique identifiers from this object will be used to personalize the push registration. Important: forexternalIdany string values such as “null”, “Null” or “NULL” are not supported and would be considered as JSON null. |
| attributes | An object that contains zero or more person fields such asfirstName,gender,customAttributes,tags, etc. | Data specified in this object will be applied to the target person to add personalization attributes. |

## Depersonalize

You can <apidocslink href="customer-engagement/people/depersonalize-push-instance">depersonalize</apidocslink> a device in order to detach it from the  current person profile so that the device won’t receive messages when targeted by any of the person attributes.