Skip to navigation

Exclude cohort

View as Markdown

Upload a cohort as multipart form-data with three fields:

  • name — Cohort name (1–50 characters)
  • cohort_file — CSV file with a header row and at least one data row
  • cohort_transformation_file — JSON file that maps CSV columns to phone numbers and agent variables

Set cohort_category to stop_file to exclude users already on this campaign. It defaults to cohort.

Path parameters

org_idstringRequired
workspace_idstringRequired
campaign_idstringRequired

Headers

X-API-KeystringRequired
Your workspace API key.

Request

This endpoint expects a multipart form with multiple files.
namestringRequired
Name of the resource
cohort_categoryenumOptional

cohort adds contacts. stop_file is an exclude cohort for users already on this campaign. Defaults to cohort.

Allowed values:
cohort_filefileRequired
CSV file containing the cohort data
cohort_transformation_filefileRequired
JSON file defining how CSV columns map to agent variables

Response

Successful Response
namestring
Name of the resource
cohort_idstring
Unique identifier for the cohort
statusenum
Current status
Allowed values:
source_typeenum
How the cohort was uploaded
Allowed values:
cohort_categoryenum

cohort is a contact batch. stop_file is an exclude cohort for users already on this campaign.

Allowed values:
created_bystring
User who created this resource
created_atdatetime

Timestamp when the resource was created (ISO 8601)

updated_atdatetime

Timestamp when the resource was last updated (ISO 8601)

resultobject or nullOptional
Processing result with record counts
updated_bystring or nullOptional
User who last updated this resource

Errors

422
Unprocessable Entity Error