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
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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):
| Field | Type | Required | Description |
|---|---|---|---|
company_id | integer | Yes | Must be an existing account and belong to the auth company hierarchy. |
type | string | Yes | One of partners, campaign. |
images | array (file[]) | Yes | One or more uploaded files. |
images.* | file | Yes | Each must be an image, mimes jpeg/png, max 2048 KB. |
status | string | No | Persisted 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 requesttype.status(string) — requeststatusoractive.path(string) — full S3 URL of the stored file.
200 OK · 200
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
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
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
422 | Validation error |
500 | Unexpected 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'Updated 11 days ago
Did this page help you?
