Skip to main content
POST
/
emails
/
v1.0
/
bulk-resubscribe
Bulk Resubscribe Users
curl --request POST \
  --url https://api-0{X}.moengage.com/emails/v1.0/bulk-resubscribe \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "recipients": [
    "jane@domain.com",
    "mike@example.com",
    "john.doe@example.com"
  ],
  "update_esp": true,
  "esp": "SENDGRID",
  "request_id": "636b77e6e2cf83277195fb60"
}
'
{ "message": "The request is submitted successfully.", "response_id": "SrTuWVlPsq" }

Supported ESPs

The Resubscription API currently supports only SendGrid.

Rate Limit

The rate limit is 10 RPM (requests per minute). The allowed volume is 14.4K requests per day, with a maximum payload size of 100 recipient email addresses per request.

Authorizations

Authorization
string
header
required

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.
  3. Use these details to authenticate the API requests.

Headers

MOE-APPKEY
string
required

This is the WORKSPACE ID of your MoEngage account.

Find your Workspace ID at Settings -> Account -> APIs -> WORKSPACE ID.

Authorization
string
required

This authentication parameter, used for access control, must be passed along with the request.

Example: Basic Base64_ENCODED_APPKEY_APIKEY==

Body

application/json

List of recipients to resubscribe and ESP preference.

recipients
string
required

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).

Example:
["john@example.com", "mike@example.com"]
esp
string
required

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.

request_id
string
required

This field contains the value of the identifier for the request.

customer_id
string

This field denotes the unique identifier used to identify a user in MoEngage. Note that devices can be created for existing users only.

update_esp
boolean

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.

Response

The request has been successfully submitted for asynchronous processing.

Success response body for the Bulk Resubscribe API (202 Accepted).

message
string

This field contains a brief description of the request status.

Example:

"The request is submitted successfully."

response_id
string

This field contains the unique identifier for the response and is present in the response only when the request is successful.

Example:

"SrTuWVlPsq"