Device Opt-out
The Device Opt-out API blocks or unblocks specific devices from receiving push notifications triggered from MoEngage. To prevent push notifications from reaching a specific user or all devices associated with a user, call the API to block them. This is useful for reasons such as device theft or fraudulent activity. For example, if a device is stolen, you can use this API to block it in MoEngage, ensuring that any scheduled push notifications with sensitive content do not get delivered. You can also use the API to unblock a device if it is recovered.
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
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:
- Navigate to Settings -> Account -> APIs.
- 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
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
This field denotes the type of user identifier.
This field denotes the user identifier.
This field denotes the type of action to be achieved using this API.
block, unblock This field denotes the reason for blocking or unblocking a device.
This field denotes the reference ID of the user.
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.