Upload Cohort
Upload a cohort of users for a deployment. When a known user calls in, the agent receives their personalized variables (name, balance, language, etc.) for a tailored conversation.
Upload as multipart form-data with three fields:
name— Cohort name (1–50 characters)cohort_file— CSV file with a header row and user datacohort_transformation_file— JSON file that maps CSV columns to phone numbers and agent variables
Overview
A cohort gives your deployment user context. When a known user calls in, the agent receives their personalized variables (name, balance, language preference, etc.) — making the conversation feel tailored rather than generic.How phone number matching works
The phone number is the lookup key. When an inbound call arrives, the system:- Extracts the caller’s phone number
- Looks it up across all cohorts uploaded to this deployment
- If found → loads that user’s agent variables into the conversation
- If not found → the agent handles the call without any personalized context
Multiple cohorts with the same phone number
If you upload multiple cohorts and the same phone number appears in more than one, the most recently uploaded cohort takes precedence. The system always uses the latest context for a given phone number. This is useful when you need to refresh user data — simply upload a new cohort with updated values. You don’t need to delete the old one.Transformation config
The transformation config tells the system how to read your CSV:Phone number normalization
The system normalizes all phone numbers to E.164 format using thecountry_code you provide. For example, with "country_code": "IN":
9876543210→+91987654321009876543210→+919876543210+919876543210→+919876543210(already valid)
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_nameapp_variableskeys must match the agent’s declared variables
- Phone number must be valid (normalizable to E.164)
- Required columns must be non-empty
- Formatting functions (if configured) must succeed
Statuses
Checking for rejected records
Afterstatus becomes completed, check result.rejected_records:
result.rejected_records > 0, download the rejection file to see which rows failed and why:
Authorizations
Body
Response
Successful Response
Cohort metadata including processing status and result counts.
Name of the cohort
Unique identifier for the cohort
"coh-x1y2z3"
Current processing status
processing, completed, failed How the cohort was uploaded
pre_signed_url, file_upload User who created this cohort
"user@company.com"
Timestamp when created (ISO 8601)
"2026-04-01T09:00:00Z"
Timestamp when last updated (ISO 8601)
"2026-04-01T09:02:30Z"
Processing result with record counts
User who last updated this cohort