Update Marketing Preferences
PUT/client/users/:correlation_id/profile/marketing-preferences
-
Body is keyed by channel → topic → status.
-
Partial PUT semantics (JSON merge-patch):
-
Topics present in a mentioned channel are written; topics absent in a mentioned channel are untouched.
-
Channels entirely absent from the body are untouched.
-
{ "EMAIL": {} }is rejected with 400 — to clear preferences for a channel, send every configured topic explicitly with the desired status.
-
-
Idempotent: replaying the same body results in no-op (unless there is a change directly in the ESP)
Allowed PUT status values: OPTED_IN, OPTED_OUT. PENDING and NOT_SET are server-only and rejected with 400.
Status codes:
-
200— success (response body = post-write CUX projection) -
400 INVALID_REQUEST— malformed shape, empty channel map, invalid status, unknown channel/topic, or channel disabled for this tenant. Themessagefield describes the specific failure (and, for unknown-topic cases, includes the per-channel allow-list). -
401— session expired / invalidcorrelation_id
Request
Responses
- 200
- 400
200 OK — Toggle NEWSLETTER to OPTED_IN
400 INVALID_REQUEST — PENDING not allowed on PUT