Create file headers

Create the file-header (column-mapping) configuration for an automation campaign and uploads the sample file to S3. The endpoint deletes any existing file-header for the campaign first, and the campaign's type is forced to automation. Sent as multipart/form-data. Emits an audit event (CAMPAIGN_FILE_HEADERS_CREATED).

Auth

  • Account bearer. The campaign must belong to the caller's person.company_id, else 404.

Rate limit

  • No rate limit.

Body (multipart/form-data)

FieldTypeRequiredNotes
rs_campaign_idintegerRequiredMust be an existing campaign and must be owned by caller and not bulk_upload/kiosk.
file_headersstring (JSON)RequiredJSON object; must contain non-empty string values for email, phone, customer_name, location_identifier.
sample_filefileRequiredmimes:xlsx,xls,csv, max 10 MB (10240 KB).
location_identifierstringRequiredMax 255. Unique per campaign store-group.

Behaviour

  • 201 with the created CampaignAutomationFileHeader row under data.data.
  • 400 if the campaign is a bulk_upload/kiosk type, or file_headers is missing required keys / has non-string values.
  • 404 if the campaign is not found or not owned by the caller.
  • 422 if base validation fails (missing file, wrong mime, duplicate location_identifier, etc.).

Saves data.data.id into fileHeaderId for the update/delete/sample-file requests.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
file
string
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json