curl --request POST \
--url https://api-{dc}.moengage.com/v1/device/{app_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "device",
"customer_id": "<string>",
"device_id": "<string>",
"attributes": {
"platform": "ANDROID",
"push_id": "<string>",
"model": "<string>",
"moe_push_provisional_opted": "<string>",
"app_version": "<string>",
"os_version": "<string>",
"moe_gaid": "<string>",
"idfv": "<string>"
}
}
'Track Device
This API adds or updates devices and device properties in MoEngage. You can create a new device for an existing user, create new device properties for an existing user, or update the device properties of the existing user.
curl --request POST \
--url https://api-{dc}.moengage.com/v1/device/{app_id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "device",
"customer_id": "<string>",
"device_id": "<string>",
"attributes": {
"platform": "ANDROID",
"push_id": "<string>",
"model": "<string>",
"moe_push_provisional_opted": "<string>",
"app_version": "<string>",
"os_version": "<string>",
"moe_gaid": "<string>",
"idfv": "<string>"
}
}
'Rate Limit
A single API request contains one or more device updates. Maintain a rate limit of 10,000 device updates per minute.Authorizations
Send your Workspace ID and API key as a base64-encoded username:password string.
- Username: Your MoEngage Workspace ID (also known as the App ID), from Settings > Account > API keys.
- Password: An API key generated from Settings > Account > API keys. Click + Create new key, set Authentication type to Basic Auth, select the Data APIs group and its Track Device scope. The legacy Data key (auth type Basic Auth (Legacy)) also works.
Refer to API Key Dashboard for details on creating and managing API keys.
Headers
The 'X-Forwarded-For' header is used to specify the IP address of the client that made the request. This header may be added by proxy servers or load balancers. The header value must contain the IP address of the original client that initiated the request. Multiple IP addresses may be specified in the header value, separated by commas.
"203.0.113.195"
Path Parameters
Body
This field denotes the unique identifier used to identify the device associated with a user in MoEngage. If your app is integrated with MoEngage SDK, the SDK assigns a unique device_id to the devices of your end-users. If your app is not integrated with MoEngage SDK, you can use unique alphanumeric values or other device attributes such as Push token, GAID/IDFV to assign unique device_id values to devices of your user.