Skip to main content
POST
/
customers
/
export
Get User
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1/customers/export \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "identifiers": [
    {
      "identifier_type": "customer_id",
      "identifier": "6416d1a318r98264512c0f89"
    }
  ],
  "user_fields_to_export": [
    "last_name",
    "customer_id",
    "name"
  ]
}
'
{
"status": "success",
"type": "export_users",
"data": {
"users_not_found": [
{
"identifier_type": "customer_id",
"identifier": "john_doe"
}
],
"users": [
{
"user_attributes": {
"last_name": "Doe",
"customer_id": "john_doe",
"name": "John",
"custom_user_attr": 12345,
"id": "62e79fb15ada55x123g987bu"
}
}
]
}
}

Rate Limit

The rate limit is 20 users per payload and 1000 users per minute.

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.

  • Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
  • Password: Use your API Key, which you can find within the Data tile.

Note: After you generate and save the Data API Key, DO NOT generate a new key unless there is a security breach. After you generate a different Data API key and save it, the authentication will start failing. You must update your existing data tracking.

For more information on authentication and getting your credentials, refer here.

Headers

X-Forwarded-For
string

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.

Example:

"203.0.113.195"

Query Parameters

app_id
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

Example:

"VJ0GSMESHMQA3L7WV1EEK3UR"

Body

application/json
identifiers
object[]

This field is used to specify the identifiers for the users for whom the data needs to be fetched. Structure:

"identifiers": [
{
"identifier_type": "customer_id",
"identifier": "<customer_id>"
},
{
"identifier_type": "id",
"identifier": "<MoEngageID>"
},
...{}
]
user_fields_to_export
string[]

This field is used to specify the fields that need to be fetched for the user specified in Identifiers. Tracked standard user attributes and custom attributes can be fetched using this API. For the list of tracked standard attributes in MoEngage, refer to User Attributes.

Example:
["last_name", "customer_id", "name"]

Response

This response is returned when the request is processed successfully.

status
string

This field contains the status of the request and specifies whether the request was successful. Supported values are : "success", "failure"

Example:

"success"

type
string

This field denotes the fetch type. Supported values are: "export_users".

Example:

"export_users"

data
object

This field contains the list of users who were not found in MoEngage and returns the data specified for the list of users who were found in MoEngage.

This is the structure:

{
"users_not_found": [
{
"identifier_type": "customer_id",
"identifier": "<customer_id>"
}
],
"users": [
{
"user_attributes": {
"<list of user attributes>"
}
}
]
}