Get a client's marketing consent history Run in API Explorer
Ask AI
Every consent decision recorded against the client, newest first.
Query parameters
-
Filter by a comma separated list of channels. One of email, phone, letter, sms.
-
Filter by the decision recorded. One of opted_in, opted_out.
-
Only decisions that took effect at or after this ISO 8601 datetime.
-
Only decisions that took effect at or before this ISO 8601 datetime.
-
Field to sort by. Valid fields are [effective_at]. Negative sign to denote DESC. Defaults to '-effective_at'.
-
Number of results to return with pagination (Default 15. Max 500).
GET
/api/v1/account/{account_uuid}/marketing-consent
curl \
--request GET 'https://api.plannrcrm.com/api/v1/account/53f22fe4-3731-4cdc-aa12-e65bd0b15e52/marketing-consent' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}"
Response examples (200)
{
"data": [
{
"uuid": "f80e1104-f768-475c-8ac2-7b718739bd06",
"channel": "email",
"status": "opted_in",
"method": "verbal",
"statement_version": "v1",
"recorded_by": {
"uuid": "80418f81-3d60-4087-bea1-649e187ebc0e",
"created_at": "2026-10-12T11:34:43+01:00",
"updated_at": "2026-10-12T11:34:43+01:00",
"type": "client",
"role": "client",
"first_name": "Gareth",
"last_name": "Thompson",
"name": "Gareth Thompson",
"email": "gareth@codepotato.co.uk",
"photo_url": "https://eu.ui-avatars.com/api/?name=Gareth+Thompson",
"external_references": {
"uuid": "92917585-6a80-4274-be19-9d29171ad33b",
"created_at": "2026-10-12T11:34:51+01:00",
"updated_at": "2026-10-12T11:34:51+01:00",
"third_party": "nucleus",
"reference": "AB123456"
}
},
"effective_at": "2026-10-12T11:34:43+01:00",
"created_at": "2026-10-12T11:34:43+01:00"
}
]
}
Response examples (400)
{
"message": "Marketing consent is only recorded for client accounts."
}
Response examples (422)
Unknown status
{
"message": "The selected status is invalid.",
"errors": {
"filter.status": [
"The selected status is invalid."
]
}
}
{
"message": "The effective from is not a valid date.",
"errors": {
"filter.effective_from": [
"The effective from is not a valid date."
]
}
}
{
"message": "The effective to must be a date after or equal to effective from.",
"errors": {
"filter.effective_to": [
"The effective to must be a date after or equal to effective from."
]
}
}