Zum Inhalt springen

List topic preferences catalog

GET
/preferences/topics
Code sample: Shell / cURL
curl --request GET \
--url 'https://rocketem.fotone.io/api/v2/preferences/topics?audience=aud_xxxxxxxxxxxx' \
--header 'Authorization: Bearer <token>'

Required scope: preferences:read

Returns the organisation’s newsletter topics (non-deleted) for the preference model. Topics use an opt-out model: a recipient with no opt-out row is opted in.

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 > Signup & unsubscribe (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.

Topic list (ordered by sort_order)

Media typeapplication/json
object
data
Array<object>
object
id

Topic public_id (tp_…)

string
name

Internal topic name

string
labels

Language-keyed display labels (e.g. {“de”: “…”, “en”: “…”})

object
key
additional properties
string
descriptions

Language-keyed descriptions

object
key
additional properties
string
is_active
boolean
sort_order
integer

Example generated

{
"data": [
{
"id": "example",
"name": "example",
"labels": {
"additionalProperty": "example"
},
"descriptions": {
"additionalProperty": "example"
},
"is_active": true,
"sort_order": 1
}
]
}

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
}
}

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
}
}