> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: November 9, 2026
> To take actions in Customer.io from an agent, use the [Customer.io CLI](https://docs.customer.io/ai/cli/get-started.md) or the [MCP server](https://docs.customer.io/ai/mcp/get-started.md).
> This page has tabbed examples for: Pipelines API (Recommended), Track API v2, Track API v1. Add `?tab=<name>` to the URL to get only that tab, and repeat it for more than one, for example `?tab=pipelines-api-recommended&tab=track-api-v2`.

# Differences between the Pipelines and Track APIs

A comprehensive comparison of the Track API and Pipelines API to help you understand when and how to use them.

## TL;DR: Which API should I use?

If you integrate directly with Customer.io and don’t plan to send your data anywhere else, we recommend the [Track API](https://docs.customer.io/integrations/api/track/). The Track API has dedicated requests for actions like deleting a person, which is a `DELETE` request. The Pipelines API handles some of these actions with specially named events instead.

The [Pipelines API](https://docs.customer.io/integrations/api/cdp/) is the better fit when you use our SDKs and libraries, which are built on it, or when you also send your data to other destinations. The Pipelines API also supports newer Customer.io features like geolocation.

## General differences

We have two APIs to help you get data into Customer.io: the [Track API](https://docs.customer.io/integrations/api/track/) and the [Pipelines API](https://docs.customer.io/integrations/api/cdp/). Most of our libraries and SDKs are based on the Pipelines API.

If you’re choosing between the two APIs, or moving an integration from one API to the other, this page can help you understand the differences between them.

The Pipelines API is based on customer data platform (CDP) APIs like Segment or Rudderstack. It’s a bit more generic than the Track API, and that means you may need to map some concepts from the Pipelines API to their equivalents in Customer.io. But, most of our integrations are built on this API. Understanding it can help you better support your integrations.

The Track API is purpose-built for Customer.io, but libraries built on it don’t support as many features as our newer, Pipelines-based integrations. While [there are two versions of the Track API](#two-versions-of-the-track-api), we typically mean the track v1 API when we talk about *The Track API* because the v2 API isn’t used in any of our libraries and rarely used in libraries built by third parties; it’s much more common that you’d encounter the v1 API.

Feature

Track API

Pipelines API

**Base URL**

`track.customer.io/api`

`cdp.customer.io`

**Version**

`v1`, `v2` (`v2` is not used in any of our libraries)

`v1`

**Authentication**

Bearer `pk_` or `sk_` key; legacy: Basic `Site ID:API Key`

Bearer `pk_` or `sk_` key; legacy: Basic `API Key:`

**Delete calls**

`DELETE` method

Use semantic events

**Person ID**

`{identifier}` in path (v1 API); can be `id` or `email`

`userId` in request body; can be `id` or `email`

**Profile Attributes**

Direct key-value pairs in `identify` calls

`traits` object in `identify` calls

**Event name**

`name` parameter

`event` parameter

**Event properties**

`data` object

`properties` object

**Timestamps**

Unix timestamps (integers in seconds)

ISO 8601 strings (down to milliseconds)

**Object support**

`v2` version of the Track API

`/group` call

**Request Limit**

32 KB single (v1/v2), 500 KB batch (v2 only)

32 KB single, 500 KB batch

## JavaScript snippets

While we typically offer integrations based on our Pipelines API, we have two different JavaScript snippets—one based on the Pipelines API and one based on the Track API. We recommend the snippet based on the Pipelines API because it offers features that aren’t available for the classic, track API-based snippet. You’ll find the recommended, Pipelines-based JavaScript snippet in our integrations catalog.

If you have an older integration, you might be using our Track-based JavaScript snippet. It’s no longer available in our integrations catalog, but we have code samples in [our legacy JavaScript documentation](https://docs.customer.io/integrations/data-in/connections/javascript/legacy-js/).

Pipelines-based snippet

Track-based snippet

`t-src`

`https://cdp.customer.io/v1/analytics-js/snippet/`

`https://track.customer.io/v1/analytics-js/snippet/`

**Authentication**

`analytics.load("YOUR_WRITE_KEY");`

`t.setAttribute('data-site-id', 'YOUR_SITE_ID');`

**Invoked with**

`analytics` or `cioanalytics`

`_cio`

**Supports anonymous in-app messaging**

**Supports objects**

[requires a work-around](#object-group-calls)

**Supports batching**

## Get API keys

Both APIs accept a public key (`pk_`) or a private key (`sk_`) as a bearer token: `Authorization: Bearer <key>`. Use a private key on your server and a public key in a browser or mobile app. [Learn more about public and private keys](https://docs.customer.io/accounts/settings/managing-credentials/#public-and-private-keys).

Both APIs also keep working with legacy credentials over Basic authentication:

*   **Pipelines API**: a write key as the username, with a blank password.
*   **Track API**: a site ID as the username and a Track API key as the password.

### Get a Pipelines API Key

1.  Go to *Integrations* and click **Add integration**.
2.  Find the **Customer.io API** integration.

     ![the integrations page, showing the Customer.io API integration](https://docs.customer.io/images/cdp-pipelines-api.png)

3.  Give the integration a name. The name helps you find and differentiate between different API credentials; you might name them for users, environments, or the services you use them for.
4.  Under *Configure your API call*, copy the API key. This is the key you’ll use to authenticate with Customer.io. The page also shows you a ready-made `curl` request with your key already filled in, so you can paste that straight into a terminal instead of building the request yourself.
5.  Send a test call with your key. Send the key as a bearer token in the `Authorization` header. Here’s an example:

    ```
    curl --request POST \
      --url https://cdp.customer.io/v1/identify \
      --header 'Authorization: Bearer <your api key>' \
      --header 'content-type: application/json' \
      -d '
      {
        "userId": "97980cfea0067",
        "traits": {
          "name": "Cool Person",
          "email": "cool.person@example.com"
        }
      }'
    ```

    A 200 response doesn't always mean we accepted your data

    If your credentials are wrong, we still return `200`, but we drop the request. Add the header `X-Strict-Mode: 1` to your call and we’ll return an error instead, which makes an authentication problem much easier to spot.

6.  Click **Test connection**. We check whether we’ve received data from your source. Sending the call isn’t enough on its own; you have to run this check for us to record that your source is connected.
7.  Click **Complete setup**.

### Get Track API credentials

1.  Go to [\> *Workspace Settings > API and webhook credentials*](https://fly.customer.io/workspaces/last/settings/api_credentials).

2.  Click **Create Track API Key**.

3.  Give your credentials a name and select the workspace you want to use them in. The name helps you find and differentiate between different API credentials; you might name them for users, environments, or the services you use them for.

     ![a new track API entry with the name 'another example'](https://docs.customer.io/images/new-track-credentials.png)

4.  Click **Create Track API Key** one last time, and you’ll have your credentials. You’ll use your *Site ID* and *API Key* as a username and password for basic authorization when you call our API. You can use these credentials with partners like Segment.

If you go to the *Integrations* page, you’ll see your new credentials listed under *Customer.io API: Track* as *Journeys API: <credential name>*.

 ![the Data and Integrations page, showing the new track API entry](https://docs.customer.io/images/new-track-credentials-cdp.png)

### Two versions of the Track API

The Track API has two versions: v1 and v2. While we discuss the v2 API in a few places on this page, and it can be useful if you write your own integration, it isn’t used in any of our libraries.

Most of the time, when we talk about *The Track API*, we’re talking about the v1 API. It was much more commonly used in our older integrations and is still in use in some third-party integrations. For example, if you integrate with Customer.io using [Segment ↗](https://segment.com/docs/connections/destinations/catalog/customer-io/), Segment sends data to Customer.io using the Track v1 API.

The major differences between the v1 and v2 APIs are that the v2 API only has two endpoints: `entity` and `batch` and determines what to do based on the `type` and `action` in the payload. The `type` represents the thing you want to work with and the `action` is what you want to do with it. Unlike our v1 API, the v2 API supports objects and relationships natively.

## Deleting data

The Track API supports `DELETE` calls to remove data. The Pipelines API does not; it only contains `POST` calls to add and update data.

To delete data with the Pipelines API, you’ll send a `POST` to the `/track` endpoint with a specific event name—we call these “semantic events.” For example, you can send a `POST` to the `/track` endpoint with the event name `User Deleted` to remove a person from Customer.io.

See [Semantic Events](https://docs.customer.io/integrations/data-in/semantic-events/cio-journeys/) for a list of the semantic events you can use with Customer.io and our Pipelines API.

## Identifying people: id and userId

In Customer.io, people have an `id` and an `email` address. You can use either to identify them, but they appear differently in our APIs.

When you use the Track v1 API, you identify people by their `id` or `email` address as a part of the URL path.

For the Pipelines API, you pass a `userId` in your payloads. This value can be an `id` *or* an `email` address and Customer.io will automatically handle it as the correct identifier. If you need to pass both, you’d pass the `userId` and a `traits.email` attribute to store the email address.

Identify by phone only in the Track v2 API

If your workspace [supports `phone` as an identifier](https://docs.customer.io/accounts/workspaces/overview/#general-workspace-settings), you can identify people by phone number only through the [Track v2 API](https://docs.customer.io/integrations/api/track/). The Track v1 and Pipelines APIs—and SDKs based on these APIs—don’t resolve phone as an identifier. You’ll need to send `phone` as an attribute (a `trait` in the Pipelines API) and identify people by `id` or `email`.

Track API

Pipelines API

`PUT /api/v1/customers/user123`

`POST /v1/identify/`

```
{
  "email": "user@example.com",
  "name": "cool person"
}
```

```
{
  "userId": "user123",
  "traits": {
    "email": "user@example.com",
    "name": "cool person"
  }
}
```

### Attributes in identify calls

The Track API treats all values in the payload of an identify call as attributes.

The Pipelines API uses a `traits` object to pass attributes. This is because the Pipelines API supports different objects in its payload (like `context` and `integrations`, etc.)

Track API

Pipelines API

`PUT [https://track.customer.io/api/v1/customers/user123](https://track.customer.io/api/v1/customers/user123)`

`POST [https://cdp.customer.io/v1/identify/](https://cdp.customer.io/v1/identify/)`

```
{
  "email": "user@example.com",
  "name": "cool person",
  "likes_pizza": true
}
```

```
{
  "userId": "user123",
  "traits": {
    "email": "user@example.com",
    "name": "cool person",
    "likes_pizza": true
  }
}
```

## Tracking events

The Track v1 API includes the identifier for the person performing the event in the URL path (`user123` in the example below), has a `name` parameter to pass the event name, and includes a `data` object to pass event properties.

The Pipelines API expects the `userId` in the payload, uses the `event` parameter to pass the event name, and includes a `properties` object to pass event properties.

Track API

Pipelines API

`PUT [https://track.customer.io/api/v1/customers/user123/events](https://track.customer.io/api/v1/customers/user123/events)`

`POST [https://cdp.customer.io/v1/track](https://cdp.customer.io/v1/track)`

```
{
  "name": "purchase",
  "data": {
    "price": 23.45,
    "product": "socks"
  }
}
```

```
{
  "userId": "user123",
  "event": "purchase",
  "properties": {
    "price": 23.45,
    "product": "socks"
  }
}
```

## Managing objects (groups)

The Pipelines API is the preferred way to support [objects](https://docs.customer.io/messaging/objects-data/objects/start/) because it has a native concept of objects and a more consistent structure with the `/group` endpoint.

To support objects with the Track API, we suggest you use the `v2` version of the Track API. But, if you’re using any of our libraries based on the Track API—all of which use `v1`—you’ll need to support objects as a part of your `identify` calls. You *cannot* delete objects with the Track v1 API.

<!-- tabs -->

<!-- tab: Pipelines API (Recommended) -->

#### Pipelines API (Recommended)

The Pipelines API has the most conventional payload for objects. You’ll pass a `groupId` representing the object, `traits` representing the object’s attributes, and a `traits.relationship_traits` object representing the relationship between the object and the person.

`POST [https://cdp.customer.io/v1/group/](https://cdp.customer.io/v1/group/)`

```

{
  "userId": "user123",
  "groupId": "group123",
  "traits": {
    "object_type_id": "1",
    "account_name": "Acme",
    "account_type": "enterprise",
    "relationship_traits": {
      "is_admin": true,
      "position": "account manager"
    }
  }
}
```

<!-- /tab -->

<!-- tab: Track API v2 -->

#### Track API v2

The Track v2 API has a more conventional payload for objects. While this is an easy way to support objects, none of our libraries rely on this API, so you’ll *only* use it when you call the API directly.

The v2 API only has `entity` and `batch` endpoints. To support objects, you’ll set the `type` in the payload to `object` to work with objects.

`POST [https://track.customer.io/v2/entity/](https://track.customer.io/v2/entity/)`

```
{
  "identifiers": {
    "object_type_id": "1",
    "object_id": "group123"
  },
  "type": "object",
  "action": "identify",
  "attributes": {
    "account_name": "Acme",
    "account_type": "enterprise"
  },
  "cio_relationships": [
    {
      "identifiers": {
        "id": "user123"
      },
      "relationship_attributes": {
        "is_admin": true,
        "position": "account manager"
      }
    }
  ]
}
```

<!-- /tab -->

<!-- tab: Track API v1 -->

#### Track API v1

The track v1 API doesn’t support objects, but you can pass a `cio_relationships` object to your `identify` calls to add and remove objects.

If the `object_id` in your request doesn’t exist, we’ll create it. While you can create and relate objects to people with this action, you can’t add attributes to an object with this action. You’d need to use one of our other APIs to do that.

`PUT [https://track.customer.io/v1/customers/user123/](https://track.customer.io/v1/customers/user123/)`

```
{
  "first_name": "Bob",
  "plan": "basic",
  "cio_relationships": {
    "action": "add_relationships",
    "relationships": [
      {
        "identifiers": {
          "object_type_id": "1",
          "object_id": "group123"
        },
        "relationship_attributes": {
          "is_admin": true,
          "position": "account manager"
        }
      }
    ]
  }
}
```

<!-- /tab -->

<!-- /tabs -->

## Timestamps

By default, the Pipelines API uses ISO 8601 timestamps (down to milliseconds), like `2023-04-26T13:42:19.722Z`. The Track API, by comparison, uses Unix timestamps (in seconds), like `1361205308`.

Customer.io typically relies on Unix timestamps for things like [segment](https://docs.customer.io/journeys/segmentation/data-driven-segments/) conditions where you might do time-based calculations. For example, if you check that an attribute *is a timestamp* in a segment, it will evaluate to `true` if the value is a Unix timestamp and false if it’s an ISO timestamp.

Most of the time, you don’t need to worry about this difference. By default, Customer.io converts ISO-8601 timestamps that come from the Pipelines API (and associated libraries) to Unix timestamps to support things you might do in Customer.io. But this distinction can be important if you need to store and manipulate timestamps in your own code.

Why does the Pipelines API use ISO 8601 timestamps when Customer.io generally expects Unix timestamps? Because ISO 8601 timestamps are common to many other platforms, and the Pipelines API is designed like a traditional customer data platform (CDP)—where you can send data to both Customer.io *and* other destinations.

The Pipelines API also includes additional timestamps—fields like `receivedAt`, `sentAt`, and `originalTimestamp`.

Track API

Pipelines API

Unix timestamp (seconds)

ISO 8601 format

```
{
  "timestamp": 1361205308
}
```

```
{
  "timestamp": "2023-04-26T13:42:19.722Z",
  "receivedAt": "2023-04-26T13:42:20.512Z",
  "sentAt": "2023-04-26T13:42:20.477Z",
  "originalTimestamp": "2023-04-26T13:42:19.722Z"
}
```

## The Pipelines API captures context and integrations

Because the Pipelines API is based off of traditional customer data platforms (CDPs) like Segment, it has reserved objects for `context` and `integrations`. The `context` object contains information about the event, like the IP address and user agent. The `integrations` object provides a way to determine which destinations you want to send your data to.

## The Pipelines API has lax and strict modes

The Track API automatically validates certain aspects of requests—like the presence of required fields and the size of the request body.

The Pipelines API doesn’t do this validation by default. Instead, it returns a `200` response for almost every request and logs errors in Customer.io. To get the same kind of validation that the Track API does, send the `X-Strict-Mode` header with a value of `1`. In strict mode, the Pipelines API returns a `401` for a missing or invalid API key and a `400` for a request that fails validation.

See [Strict mode](https://docs.customer.io/integrations/api/cdp/#strict-mode) in the Pipelines API reference for every error that strict mode returns, the required fields for each type of call, and how strict mode handles `/batch` requests.

## Maximum request sizes

The Track API has a 32 KB limit for single requests and a 500 KB limit for batch requests—which are only available in the `v2/batch` endpoint for the Track API.

The Pipelines API has a 32 KB limit for single requests and a 500 KB limit for batch requests. Each call in a batch request is also limited to 32 KB.
