v1.0.0
OpenAPI 3.1.0

List customers, attributes, and devices

US region

Client Libraries

List customers, attributes, and devices

​

Return attributes and devices for up to 100 customers by ID. If an ID in the request does not exist, the response omits it.

Query Parameters
  • id_type
    Type: string enum

    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
Body
application/json
  • ids
    Type: array string[] 1…100
    required

    An array of up to 100 customer identifiers. All values must match the id_type query parameter—id values by default.

Responses
  • application/json
  • 400

    The request is malformed.

  • application/json
Request Example for post/v1/customers/attributes
{
  "ids": [
    ""
  ]
}
{
  "customers": [
    {
      "customer": {
        "attributes": {
          "_cio_subscription_preferences_computed": "{\"topics\":{\"topic_6\":false,\"topic_7\":false,\"topic_8\":false}}",
          "cio_id": "03000001",
          "cio_subscription_preferences": "{\"topics\":{\"topic_7\":false,\"topic_8\":false}}",
          "email": "test@example.com",
          "id": "1",
          "_last_emailed": "1528932553",
          "created_at": "1489014595",
          "title": "tester",
          "department": "qa"
        },
        "devices": [
          {
            "id": "my_android_device_id",
            "platform": "android",
            "last_used": 1514764800
          },
          {
            "id": "my_ios_device_id",
            "platform": "ios",
            "last_used": 1514764800
          }
        ],
        "id": "1",
        "timestamps": {
          "_cio_subscription_preferences_computed": 0,
          "_last_emailed": 1528932553,
          "cio_id": 1489014595,
          "cio_subscription_preferences": 1673987303,
          "email": 1508932553,
          "id": 1489014595,
          "created_at": 1489014595,
          "department": 1508932553,
          "title": 1508932553
        },
        "unsubscribed": false
      }
    }
  ]
}