Customers

Search for customers

Provide a filter to search for people in your workspace. Your filter can filter people by segment (using the Segment ID) and attribute values; when you filter by attributes, you can use eq (matching an attribute value) or exists (matching when a person has the attribute). Use the and array, or array, and not object to create a complex filter. The not selector is an object that takes a single filter.

Returns arrays of identifiers and ids. In general, you should rely on the newer identifiers array, which contains more complete information about each person captured by the filter in your request, than the ids array, which only contains id values.

You can return up to 1000 people per request. If you want to return a larger set of people in a single request, you may want to use the /exports API instead.

post/v1/customers

Query parameters

startstring

The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

limitinteger

The maximum number of results you want to retrieve per page.

Request body

Example request

{
  "filter": {
    "and": [
      {
        "or": [
          {
            "segment": {
              "id": 4
            }
          }
        ],
        "not": {
          "and": [
            {
              "segment": {
                "id": 4
              }
            }
          ]
        },
        "segment": {
          "id": 4
        },
        "attribute": {
          "field": "unsubscribed",
          "operator": "eq",
          "value": true
        }
      }
    ]
  }
}

Response

Returns an array of customers matching your filters.

idsstring[]

In general, you should use the identifiers array. This array contains identifiers for people captured in your filter. However, as of June 2021, some workspaces let you add people without an id. Entries without an id are empty strings in this array, where the identifiers array contains more complete information for each person captured in the filter.

nextstring

The start value for the next page of results.

Example response

{
  "identifiers": [
    {
      "id": 1,
      "email": "person@example.com",
      "cio_id": 3000001
    },
    {
      "id": 2,
      "email": "second.person@exapmle.com",
      "cio_id": 3000002
    }
  ],
  "ids": [
    1,
    2
  ],
  "next": "MDox"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.