Skip to main content
PATCH
Update Subscription Preferences (V5)

Rate Limit

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

Authorizations

Authorization
string
header
required

Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.

  • Username: Your MoEngage app key.
  • Password: Your MoEngage API secret.

Transitional note: This route currently accepts Basic Auth only. Bearer token support (Authorization: Bearer <token>) is planned but not yet active here — Bearer requests return 401 until the APISIX gateway fronts this route.

For more information on authentication and getting your credentials, refer here.

Headers

Accept
string
Example:

"application/json"

Idempotency-Key
string<uuid>
required

A UUID v4 you generate per logical update. Reusing a key with the same request body within the retention window returns the original response without reapplying the update. Reusing a key with a different request body returns 409.

MOE-APPKEY
string
required

This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).

MOE-PROJECT-CODE
string

This is the project ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > Portfolio > Project ID. Note: This parameter is mandatory for workspaces with the Portfolio feature enabled.

X-MOE-Request-Id
string

Client-supplied trace ID for tracing. Correlates with response_id. Supply this header or request_id in the body; if both are set, they must match.

Body

application/json

The identifier of the user to update and the preference changes to apply.

user_identifier_type
enum<string>
required

The type of identifier supplied in user_identifier_value.

Available options:
moe_user_id,
uid,
email
user_identifier_value
string
required

The identifier value. For moe_user_id, accepts either the usr_-prefixed ID or the bare 24-character hex ID.

is_globally_unsubscribed
boolean
required

Required on every call. When true, the user is unsubscribed from all categories on this channel, and categories is ignored. Send false explicitly to clear an existing global unsubscribe — there is no neutral default.

request_id
string

Optional client-supplied request identifier, used for tracing.

Example:

"req_5b6d7a8f90c1e2b4d6f8091a2c3e4f56"

channel
enum<string>

Optional. The channel the categories map applies to. Only the email channel is supported at present.

Available options:
email
categories
object

Optional sparse map of category_name to subscribe state (true = subscribed, false = unsubscribed). Only the categories present here are changed; any category not included is left unchanged.

event_attributes
object

Optional. Up to 5 name/value pairs attached to the subscription-update event this call raises. Any attribute name is accepted (no allowlist). Attribute names must be 50 characters or fewer; values must be 255 characters or fewer.

Response

This response is returned when the request has been accepted and queued for asynchronous processing. The update is applied by a separate worker under SLA; this response does not confirm the update has been applied yet — poll Get Subscription Preferences to check the applied state.

response_id
string

Unique identifier for this API response.

Example:

"resp_e474cbaf-2178-4e3a-816e-7575e1dc639b"

type
string

The resource type returned in data.

Example:

"subscription_preference"

data
object