Upload an Excel/CSV audience file to a draft bulk-upload campaign, stores it on S3, and dispatches an async job (ProcessCampaignAudienceUpload) to parse and validate the recipients.
Auth: Both — authentication bearer token. The endpoint scopes the campaign in-controller, which matches the caller's person.company_id against the campaign-store's company or its parent/grandparent — so any Partner- or Account-tier user within the campaign's company tree may upload. Also rejected (400) unless status === 'draft' and type is neither automation nor kiosk.
Rate limit: No rate limit.
Request
- Body (
multipart/form-data):
| Field | Type | Required | Notes |
|---|---|---|---|
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. } envelope.
message(string) —"File uploaded successfully. Processing will begin shortly."campaign_id(integer) — the campaign ID.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.
Path params
| Parameter | Type | Required | Notes |
|---|---|---|---|
campaignId | integer | Required | Digits only. |
Errors: 422 on validation failure.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
