Upload audience
Overview
Upload an Excel/CSV audience file to a draft bulk-upload campaign. The API stores the file on S3 and dispatches an async job (ProcessCampaignAudienceUpload) to parse and validate recipients.
Prerequisites
- A bearer token. Callable with Partner and Account tokens.
- The
campaignIdof the record you are targeting.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/campaign/{campaignId}/upload-audience
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Who can call it: Partner and Account tokens.
-
The endpoint scopes the campaign in-controller. This matches the caller's
person.company_idagainst the campaign-store's company or its parent/grandparent. -
Any Partner- or Account-tier user within the campaign's company tree may upload.
-
Rejected (400) unless
status === 'draft'andtypeis neitherautomationnorkiosk.
Rate limit
- No rate limit.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
campaignId | integer | Required | Digits only. |
Request body
- Body (
multipart/form-data):
| Field | Type | Required | Description |
|---|---|---|---|
file | file (xlsx, xls, csv) | yes | Max 10 MB (max:10240 KB). Headers validated server-side: file must contain an Email OR Cell Phone column (case-insensitive); Requestor Name / Customer Name are optional. Bad headers → 400. |
Response
data.message(string) —"File uploaded successfully. Processing will begin shortly."data.campaign_id(integer) — the campaign ID.data.file_name(string) — original uploaded filename.
Note: on accept, the campaign row is updated (request_file_path, request_file_name, request_file_status='processing', type='bulk_upload', counters reset) before the job is queued; actual parsing happens asynchronously.
200 Success · 200
200{
"data": {
"message": "File uploaded successfully. Processing will begin shortly.",
"campaign_id": 1,
"file_name": "audience.xlsx"
}
}Errors
| Status | Meaning |
|---|---|
400 | The campaign is not eligible for upload (finalised or wrong type), or the file's header row is invalid. |
401 | The bearer token is missing, expired, or invalid. |
403 | The campaign's store sits outside your account tree. |
404 | The campaign id does not exist. |
422 | The request failed validation — a missing/oversized/wrong-type file returns 422, not 400 |
500 | Unexpected server error. |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/123/upload-audience" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--form '[email protected]'Updated 10 days ago
