Zum Inhalt springen

Get topic preferences for a recipient

GET
/recipients/preferences
Code sample: Shell / cURL
curl --request GET \
--url 'https://rocketem.fotone.io/api/v2/recipients/preferences?audience=aud_xxxxxxxxxxxx&email=hello%40example.com' \
--header 'Authorization: Bearer <token>'

Required scope: preferences:read

Returns the opt-out state for one email, keyed by topic public_ids. Everything is keyed by email — this also works for connector-only recipients that have no recipient record. An email without any opt-out rows is opted in to all active topics.

Requires preferences:read scope.

audience
string
/^aud_[A-Za-z0-9]{12}$/

Example

aud_xxxxxxxxxxxx

The audience to work on, by its identifier (aud_ plus 12 characters). The app shows it under Settings > Preference Center (pick the audience) > General and, with Custom Audiences on, lists all under Settings > API; GET /audiences returns them as id. The first audience’s identifier, or no parameter, addresses the newsletter. Unknown or trashed audience: 404 audience_not_found; on an endpoint without the parameter: 422 audience_not_supported.

email
required
string format: email

Current preference state

Media typeapplication/json
object
data

Topic opt-out state for one email (opt-out model — no entry = opted in)

object
email_hash

HMAC-SHA256 hash of the email

string
opted_out_topics
Array<object>
object
id

Topic public_id

string
name
string
opted_out_at
string format: date-time
source

Where the opt-out came from (e.g. preference_center, api)

string
opted_in_topics

Public ids of all active topics the email is NOT opted out of

Array<string>

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

Media typeapplication/json
object
error
object
code
string
message
string
status
integer

Example generated

{
"error": {
"code": "example",
"message": "example",
"status": 1
}
}

Token lacks required scope

Media typeapplication/json
object
error
object
code
string
message
string
status
integer

Example generated

{
"error": {
"code": "example",
"message": "example",
"status": 1
}
}

Validation failed

Media typeapplication/json
object
error
object
code
string
message
string
status
integer
details
object
key
additional properties
Array<string>

Example

{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"status": 422
}
}

Organisation not configured for API access

Media typeapplication/json
object
error
object
code
string
message
string
status
integer

Example generated

{
"error": {
"code": "example",
"message": "example",
"status": 1
}
}