v1.0.0
OpenAPI 3.1.0

Send multiple requests

US region

Client Libraries

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.

Body
application/json
  • batch
    Type: array

    A batch of requests, where each object is any individual entity payload—modifying a single person or object.

Responses
  • 200

    A successful request returns an empty object response.

  • application/json
  • application/json
  • 401

    Unauthorized request. Make sure that you provided the right credentials.

Request Example for post/api/v2/batch
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"
          }
        }
      ]
    }
  ]
}'
No Body