Custom unsubscribe handling
This endpoint lets you set a global unsubscribed status outside of the subscription pathways native to Customer.io. If you use custom unsubscribe links, you can host a custom unsubscribe page and use this API to send unsubscribe data, associated with a particular delivery, to Customer.io.
NOTE: This endpoint requires a Content-type: application/json header. This endpoint does not require an Authorization header.
Your request sets a person's unsubscribed attribute to true, attributes their unsubscribe request to the individual email/delivery that they unsubscribed from, and lets you segment your audience based on email_unsubscribed events when you use a custom subscription center.
If you use a custom subscription center (managing subscriptions to various types of messages with custom attributes), this request does not set a custom attribute. You must perform a separate request to update a person's custom subscription attributes.
- Type: stringdelivery
_id requiredThe delivery resulting in a request to unsubscribe.
- Type: booleanunsubscribe
If true, a person's
unsubscribedattribute is set to true and the unsubscription is attributed to the delivery.
- 200
A successful request returns an empty object response.
- 400
The
delivery_idformat is incorrect or the request is malformed.
curl 'https://track.customer.io/unsubscribe/{delivery_id}' \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"unsubscribe": true
}'
A successful request returns an empty object response.