Skip to main content
GET
/
category-subscription
/
user-preferences
Get Subscription Preferences
curl --request GET \
  --url https://api-{dc}.moengage.com/v1/category-subscription/user-preferences \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: <content-type>' \
  --header 'MOE-APPKEY: <moe-appkey>'
{ "categories": { "Promotional": true, "Product Update": true, "Newsletter": true, "Conferences and Events": true, "Special Offers": true, "Recommended Music": true, "New Music": true, "Playlist Updates": false, "Concert Notifications": true, "Artist Updates": true, "test": true } }

Rate Limit

The rate limit is 100 RPM and 360k per day.

FAQs

How do we fetch the parameters to be passed in the request? The user_id (MoEngage ID) and the cid (Campaign ID) fields should be fetched from the landing page URL. For example, if the link to the custom landing page was https://www.abc.com/managepreference, when the user clicks the same from the email, the link will look like this:
[https://www.abc.com/managepreference?user_id=7XvJW2dj3iS...&cid=5FGZGcA8FRv3...&app_key=UY_GHXBX](https://www.abc.com/managepreference?user_id=7XvJW2dj3iS...&cid=5FGZGcA8FRv3...&app_key=UY_GHXBX)...
You must parse this URL to extract the user_id and cid to pass to the API.

Authorizations

Authorization
string
header
required

This authentication parameter, used for access control, must be passed along with the request. To generate the authentication header, refer to Authentication.

It uses Workspace ID as username and Data API Key as password.

Headers

MOE-APPKEY
string
required

This is your MoEngage account's APP ID that has to be passed along with the request. You can find your MoEngage Workspace ID at Settings -> Account -> APIs -> Workspace ID (earlier app id).

Content-Type
string
default:application/json
required

Set the Content-Type header to application/json.

Query Parameters

user_id
string
required

This is the MoEngage ID that uniquely identifies the customer for whom the subscription preferences are being updated.

Note: MoEngage ID is encrypted using 16 bits DES and is encoded in the URL of the landing page. It must be sent as-is (encrypted).

cid
string
required

This is the campaign id of the email campaign. This field contains the information about the email campaign received by the customer.

Note: The campaign ID is encrypted using 16-bit DES and is encoded within the landing page URL. You must fetch the encrypted <campaign Id> from the URL and send it directly to MoEngage; it is not necessary to perform any decryption.

Response

Success. This response is returned when the request is processed successfully.

categories
object

A JSON Object that contains the subscription preferences of the customer. category_name is the unique category name in MoEngage.

Example:
{
  "Promotions": true,
  "Updates": false,
  "Recommendations": true,
  "Newsletter": false
}