Update file headers
Overview
Update an existing file-header configuration. Here the {fileHeaderId} path segment is the file-header ID (campaign_automation_file_headers.id). The endpoint updates only the fields supplied; a new sample_file replaces and deletes the previous S3 object. Sent as multipart/form-data. Emits an audit event (CAMPAIGN_FILE_HEADERS_UPDATED).
Prerequisites
- A bearer token in the
Authorizationheader. - The
fileHeaderIdof the record you are targeting.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
PUT /api/v1/campaign/automate/file-headers/{fileHeaderId}
Authentication
-
Requires a bearer token in the
Authorization: Bearer <bearer-token>header. -
Account bearer. The owning campaign must belong to the caller's
person.company_idand be of typeautomation, else403.
Rate limit
- No rate limit.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
fileHeaderId | integer | Required | The file-header id (route constrained to [0-9]+). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
headers | string (JSON) | Optional | `nullable |
sample_file | file | Optional | mimes:xlsx,xls,csv, max 10 MB. |
location_identifier | string | Optional | Max 255. |
How it works
200with the refreshed row underdata.data.400ifheadersis provided but malformed / missing keys / non-string values.403if the caller does not own the config's campaign or is not an automation campaign.404if no file-header row matches{fileHeaderId}.
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "File headers updated successfully",
"data": {
"id": 4,
"rs_campaign_id": 12,
"headers": {
"email": "Email Address",
"phone": "Phone Number",
"customer_name": "Customer Name",
"location_identifier": "Store ID"
},
"sample_file_path": "campaign_automation/sample_files/1718447400_sample.xlsx",
"location_identifier": "Store ID",
"created_at": "2026-06-15T10:30:00.000000Z",
"updated_at": "2026-06-15T10:30:00.000000Z"
}
}
}400 Invalid headers · 400
400{
"message": "Bad Request",
"status": "error",
"errors": {
"headers": [
"Headers must contain all required keys: Email field mapping"
]
}
}403 Not authorized · 403
403{
"message": "Not authorized to update this file header configuration",
"status": "error",
"errors": []
}404 Not found · 404
404{
"message": "File header configuration not found",
"status": "error",
"errors": []
}Errors
| Status | Meaning |
|---|---|
400 | Invalid headers |
401 | The bearer token is missing, expired or invalid |
403 | Not authorized |
404 | Not found |
422 | The request failed validation — the response names the fields |
500 | Unexpected server error |
Example request
curl --request PUT \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/automate/file-headers/123" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json' \
--form 'headers={"email":"Email Address","phone":"Phone Number","customer_name":"Customer Name","location_identifier":"Store ID"}' \
--form 'sample_file=@sample_file.xlsx' \
--form 'location_identifier=Store ID'Updated 18 days ago
Did this page help you?
