> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interchange.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create test cohort

> Define a treatment, control, or observation arm for an incrementality test

`POST /api/v2/buyer/advertisers/{advertiserId}/test-cohorts`

Creates a test cohort — a flexible audience definition (geo, segment, zip code, or custom) that fills one arm of an incrementality test. Incrementality tests compare a `TREATMENT` cohort against a matched `CONTROL`.

## Request

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.interchange.io/api/v2/buyer/advertisers/12345/test-cohorts \
    -H "Authorization: Bearer $SCOPE3_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "West Coast Treatment Group",
      "description": "Users in CA, OR, WA receiving full ad exposure",
      "cohortType": "geographic",
      "role": "TREATMENT",
      "definition": {
        "type": "geo_region",
        "regions": ["US-CA", "US-OR", "US-WA"]
      },
      "estimatedSize": 50000
    }'
  ```

  ```json Control arm theme={null}
  {
    "name": "Mountain West Control",
    "cohortType": "geographic",
    "role": "CONTROL",
    "definition": {
      "type": "geo_region",
      "regions": ["US-AZ", "US-NV", "US-NM"]
    },
    "estimatedSize": 48000
  }
  ```
</CodeGroup>

## Parameters

| Field           | Type    | Required | Notes                                                                                                                         |
| --------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `advertiserId`  | string  | Yes      | Path parameter — the owning advertiser                                                                                        |
| `name`          | string  | Yes      | Cohort label (max 255)                                                                                                        |
| `cohortType`    | string  | Yes      | Free-form classification (e.g. `geographic`, `demographic`, `behavioral`)                                                     |
| `definition`    | object  | Yes      | Targeting definition. `type` is required (`zip_code`, `user_segment`, `geo_region`, `custom`); additional fields vary by type |
| `description`   | string  | No       | Free-text description (max 1000)                                                                                              |
| `role`          | enum    | No       | `TREATMENT`, `CONTROL`, `OBSERVATION` (default `TREATMENT`)                                                                   |
| `estimatedSize` | integer | No       | Size estimate for power analysis                                                                                              |

## Response

```json theme={null}
{
  "id": "42",
  "advertiserId": "12345",
  "name": "West Coast Treatment Group",
  "description": "Users in CA, OR, WA receiving full ad exposure",
  "cohortType": "geographic",
  "role": "TREATMENT",
  "definition": { "type": "geo_region", "regions": ["US-CA", "US-OR", "US-WA"] },
  "estimatedSize": 50000,
  "isActive": true,
  "createdAt": "2026-01-15T10:30:00Z",
  "updatedAt": "2026-01-15T10:30:00Z"
}
```

The returned `id` is the `cohortId` you pass to [Get](/v2/buyer/measurement/tasks/get-test-cohort), [Update](/v2/buyer/measurement/tasks/update-test-cohort), and [Delete](/v2/buyer/measurement/tasks/delete-test-cohort).

## Errors

* `400 VALIDATION_ERROR` — missing `name`, `cohortType`, or `definition.type`, or invalid `role`.
* `404 NOT_FOUND` — `advertiserId` does not exist or is not visible to the authenticated account.

See [Errors](/v2/reference/errors) for the full error contract.

## Related

<CardGroup cols={2}>
  <Card title="Measurement tasks" href="/v2/buyer/measurement/tasks" icon="list-check">
    All measurement operations
  </Card>

  <Card title="Measurement overview" href="/v2/guides/measurement-incrementality" icon="chart-line">
    Pipeline, belief state, and concepts
  </Card>

  <Card title="List test cohorts" href="/v2/buyer/measurement/tasks/list-test-cohorts" icon="list">
    See defined cohorts
  </Card>
</CardGroup>
