Replace topic preferences for a recipient
curl --request PUT \ --url https://rocketem.fotone.io/api/v2/recipients/preferences \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "customer@example.com", "opted_out_topics": [ "tp_a1b2c3d4", "tp_e5f6a7b8" ] }'Required scope: preferences:write
FULL-SET update: the submitted opted_out_topics list REPLACES all
existing opt-outs for that email. An empty array opts the email back
in to every topic. Unknown, inactive or deleted topic ids are
rejected with 422 (unknown_topics) — nothing is silently dropped.
Opt-out model: topics not listed are opted in. Changes made here are
recorded with source api. An address deleted per GDPR request is
refused with 409, nothing is stored for it.
Requires preferences:write scope.
Authorizations
Abschnitt betitelt „Authorizations“Parameters
Abschnitt betitelt „Parameters“Header Parameters
Abschnitt betitelt „Header Parameters“Unique key for idempotent requests. Responses cached 24h.
Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“object
The audience to work on, by its identifier (aud_ plus 12 characters): in the app under Settings > Preference
Center > General (and Settings > API with Custom Audiences on), or as id in GET /audiences. The first audience’s identifier, or none, addresses the newsletter. A
Custom Audience’s table has no shop
figures (total_revenue, order_count, first_order_date, last_order_date: 422); the organisation’s
custom fields exist there too (since 2.3.0); its
doi_status is one of pending, confirmed, not_required, unsubscribed, cleaned. A newsletter opt-out does
not block an audience; complaints, bounces and legal blocks do.
Topic public_ids the email opts OUT of (full set — replaces all existing opt-outs)
Example
{ "email": "customer@example.com", "opted_out_topics": [ "tp_a1b2c3d4", "tp_e5f6a7b8" ]}Responses
Abschnitt betitelt „Responses“Preference state after the update
object
Topic opt-out state for one email (opt-out model — no entry = opted in)
object
HMAC-SHA256 hash of the email
object
Topic public_id
Where the opt-out came from (e.g. preference_center, api)
Public ids of all active topics the email is NOT opted out of
Example generated
{ "data": { "email_hash": "example", "opted_out_topics": [ { "id": "example", "name": "example", "opted_out_at": "2026-04-15T12:00:00Z", "source": "example" } ], "opted_in_topics": [ "example" ] }}Invalid or missing API token
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}Token lacks required scope
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}Validation failed, or unknown/inactive topic ids (unknown_topics)
object
object
object
Example
{ "error": { "code": "validation_error", "message": "The given data was invalid.", "status": 422 }}Organisation not configured for API access
object
object
Example generated
{ "error": { "code": "example", "message": "example", "status": 1 }}