This API can be used to resubscribe users who have previously unsubscribed on the MoEngage platform and an external email vendor platform simultaneously. This API resets the unsubscribe flag to “false” for users on MoEngage and makes a call to an External Service Provider (ESP) like SendGrid to remove the email addresses (associated with the unsubscribed users) from their suppression list.
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:
This is the WORKSPACE ID of your MoEngage account.
Find your Workspace ID at Settings -> Account -> APIs -> WORKSPACE ID.
This authentication parameter, used for access control, must be passed along with the request.
Example: Basic Base64_ENCODED_APPKEY_APIKEY==
List of recipients to resubscribe and ESP preference.
This field contains the email ids of the users who have resubscribed. Note: If an email address matches multiple profiles, all the profiles will be marked as resubscribed on the MoEngage dashboard (the unsubscribe flag will be set to false for the user).
["john@example.com", "mike@example.com"]
This field contains information about the Email Service Provider (esp) whose suppression list needs to be updated. For example, “esp”: “SENDGRID” would imply that the email address of the customers who have resubscribed to your brand need to be removed from SendGrid’s suppression list.
This field contains the value of the identifier for the request.
This field denotes the unique identifier used to identify a user in MoEngage. Note that devices can be created for existing users only.
This field’s default value is false when it is not sent in the request payload. MoEngage calls the ESP to remove the email addresses from their email suppression list when this field is true.
The request has been successfully submitted for asynchronous processing.
Success response body for the Bulk Resubscribe API (202 Accepted).