Skip to main content
POST
/
audience
Create audience with CSV upload
curl --request POST \
  --url https://atoms-api.smallest.ai/api/v1/audience \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form name=test_audience \
  --form 'description=List of customers for marketing campaign' \
  --form phoneNumberColumnName=phoneNumber \
  --form identifierColumnName=Name \
  --form file=@example-file
{
  "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
name
string
required

The name of the audience

Example:

"test_audience"

phoneNumberColumnName
string
required

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

Example:

"phoneNumber"

identifierColumnName
string
required

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

Example:

"Name"

file
file
required

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

description
string

Optional description of the audience

Example:

"List of customers for marketing campaign"

Response

Audience created successfully

status
boolean
Example:

true

data
object
I