curl --request PUT \
--url https://{organization}.rescueconsole.com/api/communications/preferences/{person_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"categories": {
"fundraising": false
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({categories: {fundraising: false}})
};
fetch('https://{organization}.rescueconsole.com/api/communications/preferences/{person_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/communications/preferences/{person_id}"
payload = { "categories": { "fundraising": False } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"person_id": "<string>",
"channel": "email",
"opted_in": true,
"categories": {},
"id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>"
}{
"person_id": "<string>",
"channel": "email",
"opted_in": true,
"categories": {},
"id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Set a person's contact preferences
Records what a person has asked for. Send opted_in, categories, or both. The categories you send are merged into those already saved: a category you leave out keeps its setting. What it stops: Send an email to this person by person_id (checked against the message’s category), and starting a conversation with them or copying them in one (checked against the category general). Mail sent to their address typed by hand, without naming the person, is not checked, and neither are the people a reply goes to. Needs write on Communications.
curl --request PUT \
--url https://{organization}.rescueconsole.com/api/communications/preferences/{person_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"categories": {
"fundraising": false
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({categories: {fundraising: false}})
};
fetch('https://{organization}.rescueconsole.com/api/communications/preferences/{person_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/communications/preferences/{person_id}"
payload = { "categories": { "fundraising": False } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"person_id": "<string>",
"channel": "email",
"opted_in": true,
"categories": {},
"id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>"
}{
"person_id": "<string>",
"channel": "email",
"opted_in": true,
"categories": {},
"id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Path Parameters
The person's ID.
Body
Response
The preferences, as they now are.
email false means the person has opted out of email from your organization altogether.
Opt-outs by category. A category set to false is one the person does not want; a category not listed is allowed.
Show child attributes
Show child attributes
Null when nothing has been saved for this person.
Your organization's ID.
Null when nothing has been saved.