Updates a user’s overall email opt-in status and/or category-level subscription preferences within MoEngage. This API is typically used after a user submits the second confirmation through MoEngage consent-seeking emails (Double Opt-in).
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 (earlier APP ID) of your MoEngage workspace. You must pass the MOE-APPKEY in the request.
Find your Workspace ID at Settings -> Account -> APIs -> Workspace ID.
Set the Content-Type header to application/json for this API.
application/json This authentication parameter, used for access control, must be included in the request.
The request body contains the user's email preference details encapsulated in a user_preferences object.
The main wrapper object for the user preferences payload.
Contains the user's opt-in preferences. Must contain either customer_id or email_id.
The request has been processed successfully.
Success response body for the Opt-in Management API (200 OK).
The success message denoting the request was processed successfully.
"Your request has been processed successfully"