v1.0.0
OpenAPI 3.1.0

Lookup a customer's subscription preferences

US region

Client Libraries

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.

Path Parameters
  • customer_id
    Type: string
    required

    The ID of the customer you want to perform an operation against.

Query Parameters
  • id_type
    Type: stringenum

    The type of customer_id you want to use to reference a person. If you don't provide this parameter, we assume that the customer_id in your request is a person's id. You can use email and phone only if they're enabled as identifiers in your workspace settings; otherwise the request returns 400. Reference phone values in E.164 format, like +14155552671, and URL-encode the leading + as %2B.

    values
    • id
    • email
    • phone
    • cio_id
  • language
    Type: string

    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.

Headers
  • Accept-Language
    Type: stringFormat: string

    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.

Responses
  • application/json
  • application/json
  • 404

    The customer_id does not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for get/v1/customers/{customer_id}/subscription_preferences
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."
    }
  }
}