v1.0.0
OpenAPI 3.1.0

Custom unsubscribe handling

US region

Client Libraries

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.

Path Parameters
  • delivery_id
    Type: string
    required

    The delivery resulting in a request to unsubscribe.

Body
application/json
  • unsubscribe
    Type: boolean

    If true, a person's unsubscribed attribute is set to true and the unsubscription is attributed to the delivery.

Responses
  • 200

    A successful request returns an empty object response.

  • 400

    The delivery_id format is incorrect or the request is malformed.

Request Example for post/unsubscribe/{delivery_id}
curl 'https://track.customer.io/unsubscribe/{delivery_id}' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "unsubscribe": true
}'
No Body