Save images (upload)

Overview

Upload one or more image files to S3 (under account/images/{type}) and create an Image row per file for the account. The saved records are returned with public S3 URLs. Send the request as multipart/form-data.

Prerequisites

  • A bearer token. Callable with Partner and Account tokens.

Base URL

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

Endpoint

POST /api/v1/account/images/save

Authentication

  • Requires a bearer token in the Authorization: Bearer <bearer-token> header.

  • Who can call it: Partner and Account tokens.

  • Authentication.

  • Target company must sit inside your own account tree, keyed on company_id. It must resolve into the authenticated user's company hierarchy.

  • A Partner can target any company in its tree. An Account reaches only its own hierarchy.

Rate limit

  • No rate limit.

Request body

  • Body (multipart/form-data):
FieldTypeRequiredDescription
company_idintegerYesMust be an existing account and belong to the auth company hierarchy.
typestringYesOne of partners, campaign.
imagesarray (file[])YesOne or more uploaded files.
images.*fileYesEach must be an image, mimes jpeg/png, max 2048 KB.
statusstringNoPersisted as-is; controller defaults to active when you omit it (not validated).

Response

  • data.status (string) — success.
  • data.message (string) — Logos saved successfully!.
  • data.data[] (array) — one object per saved image:
  • id (integer) — new image id.
  • name (string) — sanitized original filename ([^\w.\-] replaced with _, truncated to 100 chars) plus guessed extension.
  • type (string) — echoes request type.
  • status (string) — request status or active.
  • path (string) — full S3 URL of the stored file.

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Logos saved successfully!",
    "data": [
      {
        "id": 12,
        "name": "partner_logo.png",
        "type": "partners",
        "status": "active",
        "path": "https://s3.amazonaws.com/bucket/account/images/partners/AbC123.png"
      }
    ]
  }
}

422 Validation error · 422

{
  "message": "The images field is required.",
  "errors": {
    "images": ["The images field is required."],
    "images.0": ["The images.0 must be a file of type: jpeg, png."]
  }
}

Errors

StatusMeaning
401The bearer token is missing, expired or invalid
422Validation error
500Unexpected server error

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/images/save" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --form 'company_id=123' \
  --form 'type=partners' \
  --form 'images[]=@images/partner_logo.png'

Did this page help you?