Create audience with CSV upload

View as Markdown
Create a new audience by uploading a CSV file containing phone numbers. Only CSV text files are accepted — binary files will produce malformed data. **Additional 400 cases:** - Duplicate phone numbers in the CSV: `"Some phone numbers in your CSV already exist in this audience. Please remove duplicate entries and try again."` - Member limit exceeded: `"Audience cannot exceed X members"`

Authentication

AuthorizationBearer

API key from the console ApiKey collection, sent as Bearer token. Also accepts session cookies for browser-based auth.

Request

This endpoint expects a multipart form containing a file.
namestringRequired
The name of the audience
descriptionstringOptional
Optional description of the audience
phoneNumberColumnNamestringRequired
The name of the column in the CSV that contains phone numbers
identifierColumnNamestringOptional

The name of the column in the CSV that contains identifiers (e.g., names)

filefileRequired

CSV file containing phone numbers and identifiers (max 5MB)

Response

Audience created successfully
statusboolean
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error