Audience

Create audience with CSV upload

Changed on

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"
post/audience

Request

  • Base URL
    https://api.smallest.ai/atoms/v1
  • URL
    https://api.smallest.ai/atoms/v1/audience
  • Auth
    HTTP bearer

Request body multipart/form-data

namestring required

The name of the audience

descriptionstring

Optional description of the audience

phoneNumberColumnNamestring required

The name of the column in the CSV that contains phone numbers

identifierColumnNamestring

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

filestring binary required

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

Example request

{
  "name": "test_audience",
  "description": "List of customers for marketing campaign",
  "phoneNumberColumnName": "phoneNumber",
  "identifierColumnName": "Name",
  "file": "audience_template.csv"
}

Response

Audience created successfully

statusboolean

Example response

{
  "status": true,
  "data": {
    "_id": "60d0fe4f5311236168a109ca",
    "name": "My Customer List",
    "description": "List of customers for marketing campaign",
    "phoneNumberColumnName": "phoneNumber",
    "identifierColumnName": "Name",
    "organization": "60d0fe4f5311236168a109cb",
    "createdBy": "60d0fe4f5311236168a109cc",
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Changes