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.
- 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: array string[] 1…100idsrequired
An array of up to 100 customer identifiers. All values must match the
id_typequery parameter—idvalues by default.
- application/json
- 400
The request is malformed.
- 429
Your request is over the 10-per-second limit.
curl 'https://api.customer.io/v1/customers/attributes?id_type=id' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"ids": [
""
]
}'
{
"customers": [
{
"customer": {
"id": "1",
"attributes": {
"_last_emailed": "1528932553",
"created_at": "1489014595",
"email": "test@example.com",
"title": "tester",
"department": "qa",
"id": "1",
"cio_id": "03000001",
"cio_subscription_preferences": "{\"topics\":{\"topic_7\":false,\"topic_8\":false}}",
"_cio_subscription_preferences_computed": "{\"topics\":{\"topic_6\":false,\"topic_7\":false,\"topic_8\":false}}"
},
"timestamps": {
"cio_id": 1489014595,
"_last_emailed": 1528932553,
"created_at": 1489014595,
"email": 1508932553,
"id": 1489014595,
"department": 1508932553,
"title": 1508932553,
"_cio_subscription_preferences_computed": 0,
"cio_subscription_preferences": 1673987303
},
"unsubscribed": false,
"devices": [
{
"id": "my_android_device_id",
"last_used": 1514764800,
"platform": "android"
},
{
"id": "my_ios_device_id",
"last_used": 1514764800,
"platform": "ios"
}
]
}
}
]
}Returns an array of customers. Each object represents a customer profile.