Skip to main content

PUT /preferences/:recipient_id

PUThttps://api.courier.com/preferences/:recipient_id
Replace an existing set of preferences with the supplied values or create a new set of preferences if they do not already exist.
PATH PARAMS
recipient_idstringrequired
A unique identifier representing the recipient associated with the requested profile.
BODY PARAM
notificationsrecordrequired
json object that contains notification ids with the respective preferences
categoriesrecord
json object that contains category ids with the respective preferences
Responses
AUTH TOKEN
curl --request PUT \
--url https://api.courier.com/preferences/0460766e-8463-4905-ae98-b72c7aef41d6 \
--header 'Accept: application/json'
Response Example
{
"status": "SUCCESS"
}

Example

Method: PUT

URL: https://api.courier.com/preferences/0460766e-8463-4905-ae98-b72c7aef41d6

Body: ​

{
"notifications": {
"abcdefg12345678": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
},
"categories": {
"cooking": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
}
}