Skip to main content
POST
/
advertisers
/
{advertiserId}
/
test-cohorts
Create test cohort
curl --request POST \
  --url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "West Coast Treatment Group",
  "cohortType": "geographic",
  "definition": {
    "type": "zip_code"
  }
}
'
{
  "cohort": {
    "id": "cohort_abc123",
    "advertiserId": "12345",
    "name": "West Coast Treatment Group",
    "cohortType": "geographic",
    "role": "TREATMENT",
    "definition": {
      "type": "zip_code"
    },
    "isActive": true,
    "createdAt": "2025-01-15T10:30:00Z",
    "updatedAt": "2025-01-20T14:45:00Z",
    "description": "<string>",
    "estimatedSize": 50000
  }
}

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.

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

advertiserId
string
required

Unique identifier for the advertiser

Minimum string length: 1
Example:

"12345"

Body

application/json

Request body for creating a new test cohort

name
string
required

Name of the test cohort

Required string length: 1 - 255
Example:

"West Coast Treatment Group"

cohortType
string
required

Type classification for the cohort

Minimum string length: 1
Example:

"geographic"

definition
object
required

Cohort targeting definition

description
string

Optional description of the test cohort

Maximum string length: 1000
Example:

"Users in CA, OR, WA receiving full ad exposure"

role
enum<string>
default:TREATMENT

Role of the cohort in the test (default: TREATMENT)

Available options:
TREATMENT,
CONTROL,
OBSERVATION
estimatedSize
integer

Estimated number of users in this cohort

Required range: 0 <= x <= 9007199254740991
Example:

50000

Response

Create test cohort

Response containing a single test cohort

cohort
object
required

Test cohort resource representation