Lookup a customer's activities
Return a list of activities performed by, or for, a customer. Activities are things like attribute changes and message sends.
This endpoint is guaranteed to return activity history within the past 30 days. It might return data older than 30 days in some circumstances, but activites older than 30 days are not guaranteed.
- 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: stringstart
The token for the page of results you want to return. Responses contain a
nextproperty. Use this property as thestartvalue to return the next page of results. - Type: integerlimitmax:100
The maximum number of results you want to retrieve per page.
- Type: stringenumtype
The type of activity you want to search for. Types with
_o:<object_type_id>are for objects and types with_r:<object_type_id>are for relationships.values- add
_relationship - anon
_merge - attempted
_action - attempted
_email - attempted
_in _app
- Type: stringname
For
eventandattribute_updatetypes, you can search by event or attribute name respectively.
- application/json
- 400
The request parameters are malformed.
- 404
The
customer_iddoes not exist. - 429
Your request is over the 10-per-second limit.
curl 'https://api.customer.io/v1/customers/12345/activities?id_type=id&start=&limit=10&type=add_relationship&name=' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"activities": [
{
"customer_id": "42",
"customer_identifiers": {
"email": "test@example.com",
"id": 2,
"cio_id": "a3000001"
},
"data": {
"delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
"opened": null,
"delivered": null
},
"delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
"delivery_type": "email",
"id": "01AK4N8V8G8KVA4HN8Y50CCZ59",
"timestamp": 1397566226,
"type": "sent_email",
"name": "string",
"url": "string"
}
]
}Returns an array of activity objects. Each object represents an activity that the customer performed, or that you performed on behalf of the customer.