Skip to main content

Update a list

Create or replace an existing list with the supplied values.

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

Method: PUT

PATH PARAMS

list_idstringrequired
A unique identifier associated with the list you wish to retrieve.

BODY PARAMS

namestringrequired
List name
preferencesobject
+ Show Properties
RESPONSES:

status: 204 Successfully created

status: 400 Bad Request

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.
Request Example
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"
}
'
Responses Example
Empty
{
"message": "Error Message",
"type": "invalid_request_error"
}

Response 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"
}
}
}
}
Was this helpful?