Skip to main content

Update a List

List_id is not reuseable

A deleted list_id can be restored via the Restore a List API and once deleted cannot be used to create a new list.

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"
}
}
}
}