Skip to main content

PUT /lists/:list_id/subscriptions/:recipient_id

PUThttps://api.courier.com/lists/:list_id/subscriptions/:recipient_id
Subscribe a recipient to an existing list (note: if the List does not exist, it will be automatically created).
PATH PARAMS
list_idstringrequired
A unique identifier associated with the list you wish to retrieve.
recipient_idstringrequired
A unique identifier representing the recipient associated with the list
BODY PARAM
preferencesobject
notificationsrecordrequired
json object that contains notification ids with the respective preferences
categoriesrecord
json object that contains category ids with the respective preferences
templateIdstring
specify an optional preference template id to validate preferences before persisting it
Responses
204 Successfully created
AUTH TOKEN
curl --request PUT \
--url https://api.courier.com/lists/example.list.id/subscriptions/0460766e-8463-4905-ae98-b72c7aef41d6 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"preferences": {
"notifications": {},
"categories": {},
"templateId": "W951R8G37V49KZMK8DEKW8Z588BZ"
}
}
'
Response Example
Empty