Record a client's marketing consent Run in API Explorer
Ask AI
Records one decision per channel supplied. Every call appends to the history; nothing is overwritten. Portal users are always recorded with the client_portal method at the current time.
PUT
/api/v1/account/{account_uuid}/marketing-consent
curl \
--request PUT 'https://api.plannrcrm.com/api/v1/account/53f22fe4-3731-4cdc-aa12-e65bd0b15e52/marketing-consent' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--header "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
--data '{
"consents": [
{
"channel": "email",
"opt_in": true,
"method": "verbal",
"statement_version": "v1",
"effective_at": "2026-09-28T10:15:00+01:00"
},
{
"channel": "sms",
"opt_in": false
}
]
}'
Request examples
# Headers
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}
# Payload
{
"consents": [
{
"channel": "email",
"opt_in": true,
"method": "verbal",
"statement_version": "v1",
"effective_at": "2026-09-28T10:15:00+01:00"
},
{
"channel": "sms",
"opt_in": false
}
]
}
Response examples (200)
{
"email": "opted_in",
"phone": "opted_out",
"letter": "not_captured",
"sms": "not_captured"
}
Response examples (400)
{
"message": "Marketing consent can only be recorded for client accounts."
}
Response examples (422)
Opt-in without a consent method
{
"message": "The method field is required when opt in is true.",
"errors": {
"consents.0.method": [
"The method field is required when opt in is true."
]
}
}
{
"message": "The statement version field is required when opt in is true.",
"errors": {
"consents.0.statement_version": [
"The statement version field is required when opt in is true."
]
}
}
{
"message": "The selected channel is invalid.",
"errors": {
"consents.0.channel": [
"The selected channel is invalid."
]
}
}
{
"message": "The selected method is invalid.",
"errors": {
"consents.0.method": [
"The selected method is invalid."
]
}
}
{
"message": "The effective at field must be a valid date.",
"errors": {
"consents.0.effective_at": [
"The effective at field must be a valid date."
]
}
}