Get sample file info

Overview

Get the S3 URL and metadata (name, size, mime type) for the sample file attached to a file-header configuration. The {id} path segment is the file-header id.

Prerequisites

  • A bearer token in the Authorization header.
  • The fileHeaderId of the record you are targeting.

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

GET /api/v1/campaign/automate/file-headers/{fileHeaderId}/sample-file

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_id and be of type automation, else 403.

Rate limit

  • No rate limit.

Path parameters

FieldTypeRequiredDescription
fileHeaderIdintegerRequiredThe file-header id (route constrained to [0-9]+).

How it works

  • 200 with data.data = { file_path (S3 URL), file_name, file_size (bytes), file_type (mime) }.
  • 403 if the caller does not own the config's campaign or is not an automation campaign.
  • 404 if the file-header row is missing, or its sample_file_path no longer exists on S3.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "data": {
      "file_path": "https://d2ny6zb7otrnhl.cloudfront.net/campaign_automation/sample_files/1718447400_sample.xlsx",
      "file_name": "1718447400_sample.xlsx",
      "file_size": 10240,
      "file_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
    }
  }
}

404 Sample file not found · 404

{
  "message": "Sample file not found",
  "status": "error",
  "errors": []
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
403The token is valid but the record sits outside your account
404Sample file not found
500Unexpected server error

Example request

curl --request GET \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/automate/file-headers/123/sample-file" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json'

Did this page help you?