Send multiple requests
This endpoint lets you batch requests for different people and objects in a single request. Each object in your array represents an individual "entity" operation—it represents a change for a person, an object, or a delivery.
You can mix types in this request; you are not limited to a batch containing only objects or only people. An "object" is a non-person entity that you want to associate with one or more people—like a company, an educational course that people enroll in, etc.
Your batch request must be smaller than 500kb. Each of the requests within the batch must also be 32kb or smaller.
- Type: arraybatch
A batch of requests, where each object is any individual entity payload—modifying a single person or object.
- 200
A successful request returns an empty object response.
- application/json
- application/json
- 401
Unauthorized request. Make sure that you provided the right credentials.
curl https://track.customer.io/api/v2/batch \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"batch": [
{
"type": "person",
"identifiers": {
"id": "42"
},
"action": "identify",
"attributes": {
"first_name": "Jane",
"last_name": "Doe",
"plan": "premium"
}
},
{
"type": "object",
"identifiers": {
"object_type_id": "1",
"object_id": "acme"
},
"action": "identify",
"attributes": {
"name": "Acme Corp",
"plan": "enterprise",
"seats": 50
}
},
{
"type": "object",
"identifiers": {
"object_type_id": "1",
"object_id": "acme"
},
"action": "add_relationships",
"cio_relationships": [
{
"identifiers": {
"id": "42"
},
"relationship_attributes": {
"role": "admin"
}
}
]
}
]
}'
A successful request returns an empty object response.