Update test cohort
curl --request PUT \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Measurement
Update test cohort
Update an existing test cohort.
PUT
/
advertisers
/
{advertiserId}
/
test-cohorts
/
{cohortId}
Update test cohort
curl --request PUT \
--url https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.interchange.io/api/v2/buyer/advertisers/{advertiserId}/test-cohorts/{cohortId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Unique identifier for the test cohort
Minimum string length:
1Example:
"cohort_abc123"
Body
application/json
Request body for updating a test cohort (all fields optional)
Updated name of the test cohort
Required string length:
1 - 255Example:
"West Coast Treatment Group - Updated"
Updated description of the test cohort
Maximum string length:
1000Updated type classification for the cohort
Minimum string length:
1Updated role of the cohort in the test
Available options:
TREATMENT, CONTROL, OBSERVATION Updated cohort targeting definition
Show child attributes
Show child attributes
Updated estimated number of users in this cohort
Required range:
0 <= x <= 9007199254740991Response
Update test cohort
Response containing a single test cohort
Test cohort resource representation
Show child attributes
Show child attributes