Skip to main content
POST
/
devices
/
manage
Device Opt-out
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1/devices/manage \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_identifier_type": "<string>",
  "user_identifier_value": "<string>",
  "action_type": "block",
  "reason": "<string>",
  "client_reference_id": "<string>",
  "device_identifiers": [
    {
      "GAID": "<string>",
      "IDFV": "<string>",
      "unique_id": "<string>",
      "device_unique_id": "<string>",
      "push_id": "<string>"
    }
  ]
}
'
{ "status": "success", "message": "Your request has been accepted and will be processed soon." }

Rate Limit

1000 API requests per min.

Postman Collections

We have made it easy for you to test the APIs. Click here to view it in Postman.

Authorizations

Authorization
string
header
required

This authentication parameter, used for access control, must be passed along with the request. The API request will be authenticated through Basic Authentication. Basic Authentication sends a Base64-encoded string containing your username and password with every API request. It encodes a 'username:password' string in Base64 and appends the encoded string with 'Basic '. This string is included in the authorization header as shown below:

{"Authorization: Basic Base64_ENCODED_WORKSPACEID_APIKEY=="}

The username and password details can be obtained from the MoEngage Dashboard. If you're using the API for the first time, follow these steps:

  1. Navigate to Settings -> Account -> APIs.
  2. Copy the following details:
    • Username: Under Workspace ID (earlier app id), click the copy icon to copy the username.
    • Password: In the API keys section, click the copy icon in the Data tile to copy the API key.

Use these details to authenticate the API requests.

Query Parameters

app_id
string
required

This is the Workspace ID of your MoEngage account that must be included in the request. You can find your Workspace ID in the following navigation on the dashboard: Settings > Account > APIs > Workspace ID.

Body

application/json
user_identifier_type
string
required

This field denotes the type of user identifier.

user_identifier_value
string
required

This field denotes the user identifier.

action_type
enum<string>
required

This field denotes the type of action to be achieved using this API.

Available options:
block,
unblock
reason
string

This field denotes the reason for blocking or unblocking a device.

client_reference_id
string

This field denotes the reference ID of the user.

device_identifiers
object[]

This field denotes the device identifiers associated with the device you intend to block or unblock. Supported values are:

  • unique_id (unique_id)
  • device_unique_id (device_id)
  • push_id (push_id)
  • moe_gaid (GAID)

Note:

  • If you do not pass this value, the API blocks/unblocks all current devices of the user.
  • Ensure to pass any one of the device identifiers for a particular device.
  • When passing the device identifiers within the array, ensure to explicitly define each of them.

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.

Example:

"success"

message
string
Example:

"Your request has been accepted and will be processed soon."