Lookup a customer's subscription preferences
Returns a list of subscription preferences for a person, including the custom header of the subscription preferences page, topic names, and topic descriptions. Returns translated data when you send a language in the query.
- Type: stringcustomer
_id requiredThe ID of the customer you want to perform an operation against.
- Type: stringenumid
_type The type of
customer_idyou want to use to reference a person. If you don't provide this parameter, we assume that thecustomer_idin your request is a person'sid. You can useemailandphoneonly if they're enabled as identifiers in your workspace settings; otherwise the request returns400. Referencephonevalues in E.164 format, like+14155552671, and URL-encode the leading+as%2B.values- id
- email
- phone
- cio
_id
- Type: stringlanguage
A language tag you want the content translated in. If none is provided, the content will be sent in the default language of your subscription center.
- Type: stringFormat: stringAccept
- Language The language tag you want the content translated in. If none is provided, the content will be sent in the default lanauge of your subscription center.
- application/json
- application/json
- 404
The
customer_iddoes not exist. - 429
Your request is over the 10-per-second limit.
curl 'https://api.customer.io/v1/customers/12345/subscription_preferences?id_type=id&language=' \
--header 'Accept-Language: ' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"customer": {
"id": "1",
"identifiers": {
"cio_id": "01000001",
"email": "me@example.com",
"id": "1"
},
"topics": [
{
"id": 1,
"subscribed": true,
"name": "Offers",
"description": "Description for topic 1, if any"
},
{
"id": 2,
"subscribed": true,
"name": "News and Programs",
"description": "Description for topic 2, if any"
},
{
"id": 3,
"subscribed": false,
"name": "Feedback",
"description": "Description for topic 3, if any"
}
],
"unsubscribed": false,
"header": {
"title": "Manage your subscription preferences",
"subtitle": "Check the box next to each topic you'd like to subscribe to."
}
}
}Returns the customer's associated subscription preferences.