Zum Inhalt springen

Field discovery

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

Required scope: recipients:read

Lists every field the recipient endpoints can return or accept — standard columns plus the organisation’s custom fields — with type, label, PII flag and whether the write endpoints accept it.

Use this to discover the org-specific custom fields before building an integration: custom fields are readable/writable under their own name on the recipient endpoints and are always treated as PII (an org may store personal notes there), so reading them requires recipients:read_pii.

Requires recipients: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.

Field list

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

Column name as returned in read responses

string
api_write_name

Field name accepted by the write endpoints (e.g. street for address1); null = read-only

string
nullable
type

Field type (string, integer, decimal, date, datetime, boolean, …)

string
label

Human-readable label

string
is_custom

True for org-defined custom fields

boolean
pii

Requires recipients:read_pii to read (custom fields are always PII)

boolean
readable
boolean
writable
boolean

Example generated

{
"data": [
{
"name": "example",
"api_write_name": "example",
"type": "example",
"label": "example",
"is_custom": true,
"pii": true,
"readable": true,
"writable": true
}
]
}

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