Upload Cohort
Cohorts
Upload Cohort
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 rowcohort_transformation_file— JSON file that maps CSV columns to phone numbers and agent variables
POST
Upload Cohort
Overview
A cohort is a batch of users uploaded as a CSV along with a transformation config (JSON) that maps your CSV columns to phone numbers and agent variables. Uploading a cohort triggers background processing that validates each row and queues calls for valid records.Validation
Blocking — rejects the entire upload:- All referenced
column_namevalues must exist as CSV headers - CSV must have at least one data row
app_overrideskeys must be one of:initial_bot_message,initial_state_name,initial_language_name- For agent campaigns:
app_variableskeys must match the agent’s declared variables
- Phone number must be valid (normalized to E.164)
- Required columns must be non-empty
- Formatting functions (if configured) must succeed
rejected_reason column.
Statuses
Rejected records
Oncestatus is completed, always check result.rejected_records. Poll:
result.rejected_records > 0, download the file to see which rows failed and why, then fix the data and re-upload:
Rejected users will not be called. Catching and re-uploading them before the campaign goes live ensures maximum coverage.
Authorizations
Body
multipart/form-data
Response
Successful Response
Cohort metadata including processing status and result counts.
Name of the resource
Example:
"April Batch 1"
Unique identifier for the cohort
Example:
"coh-x1y2z3"
Current status
Available options:
processing, completed, failed Example:
"completed"
How the cohort was uploaded
Available options:
pre_signed_url, file_upload Example:
"file_upload"
User who created this resource
Example:
"user@company.com"
Timestamp when the resource was created (ISO 8601)
Example:
"2026-04-01T09:00:00Z"
Timestamp when the resource was last updated (ISO 8601)
Example:
"2026-04-01T09:05:00Z"
Processing result with record counts
Example:
User who last updated this resource
Example:
"user@example.com"