Skip to main content

PUT /lists/:list_id

PUThttps://api.courier.com/lists/:list_id
Create or replace an existing list with the supplied values.
PATH PARAMS
list_idstringrequired
A unique identifier associated with the list you wish to retrieve.
BODY PARAM
namestringrequired
List name
preferencesobject
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/lists/example.list.id \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Example List Name"
}
'
Response Example
Empty

Example

​ Method: PUT

URL: https://api.courier.com/lists/abcdefgh12345678

Body: ​

{
"name": "Example List Name",
"preferences": {
"notifications": {
"abcdefgh12345678": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
},
"categories": {
"cooking": {
"channel_preferences": [
{
"channel": "direct_message"
}
],
"rules": [
{
"type": "snooze"
}
],
"status": "OPTED_IN"
}
}
}
}