Skip to main content

Unsubscribe a user from a list

Delete a subscription to a list by list ID and user ID.

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

Method: DELETE

Path Parameters

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

Responses

status: 204 Successfully deleted

status: 404 Not Found

messagestring
A message describing the error that occurred.
typestring
[invalid_request_error] The type of error that occurred.

Request Example

curl --request DELETE \
--url https://api.courier.com/lists/example.list.id/subscriptions/0460766e-8463-4905-ae98-b72c7aef41d6 \
--header 'Accept: application/json'

Responses Example

Empty
{
"message": "Not Found",
"type": "invalid_request_error"
}

Example

Method: DELETE

URL: https://api.courier.com/lists/abcdefgh12345678/subscriptions/0460766e-8463-4905-ae98-b72c7aef41d6

Was this helpful?