White Label - Save theme options

Overview

Save the theme options for one account, and optionally uploads a theme logo at the same time. Call it whenever the account changes its palette, layout or logo. It creates the theme record on first save and updates it on every save after that.

Prerequisites

  • A bearer token for a Partner or Account user (see Authentication below).
  • The company_id of the account you are theming. It must sit inside your own hierarchy.
  • To upload a logo: a JPEG or PNG no larger than 400 KB.

Base URL

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

Endpoint

POST /api/v1/account/white-label/theme/save

Authentication

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

  • Who can call it: partner and account tokens — under the role-agnostic account/white-label group.

  • company_id must sit within your own account hierarchy. A partner can theme any account beneath it. An account user reaches only its own part of the account tree.

  • user_id only has to be an existing user; the platform does not hierarchy-check it. It records who saved the theme.

Rate limit

  • No rate limit.

Request body

Choose the content type to match what you are sending:

You are sendingContent type
Theme options onlyapplication/json
Theme options and a logo filemultipart/form-data

Both accept the same fields. Use multipart/form-data only when you attach logo_image, because a file cannot travel in a JSON body.

FieldTypeRequiredDescription
user_idintegerRequiredMust be an existing user. Recorded as the author of the save.
company_idintegerRequiredThe account to theme. Must be in your own hierarchy.
theme_optionsstringRequiredA JSON-encoded string, stored verbatim and returned unchanged. Note this is a string, not a nested object.
logo_imagefileOptionalJPEG or PNG, max 400 KB. Replaces the account's white-label logo.

Uploading a logo

Send each field as a separate form part and let curl set the boundary — do not set Content-Type yourself:

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/white-label/theme/save" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --form 'user_id=3' \
  --form 'company_id=5' \
  --form 'theme_options={"mode":"system","primaryColor":"#f1874c"}' \
  --form 'logo_image=@/path/to/logo.png'

How it works

  • 200 returns the saved theme row plus the account's white-label record, with every image field rewritten to a full URL (or null where unset).
  • 422 when validation fails — for example a missing theme_options, a company_id outside your hierarchy, or a logo over 400 KB or in an unsupported format.
  • Uploading a logo also creates the account's white-label record if it does not exist yet, which is why the white_label object can come back with most fields empty on a first upload.

Response

200 OK · 200

{
  "data": {
    "status": "success",
    "message": "Theme options saved successfully.",
    "data": {
      "company_id": 5,
      "user_id": 3,
      "theme_options": "{\"mode\":\"system\",\"skin\":\"default\",\"primaryColor\":\"#f1874c\"}",
      "updated_at": "2026-06-23T10:00:00.000000Z",
      "created_at": "2026-06-23T10:00:00.000000Z",
      "id": 1
    },
    "white_label": {
      "id": 1,
      "company_id": 5,
      "logo": "https://d2ny6zb7otrnhl.cloudfront.net/white-label/logo/abc.png",
      "login_logo": null,
      "mobile_logo": null,
      "favicon": null
    }
  }
}

422 Unprocessable Entity · 422

{
  "message": "The theme options field is required.",
  "errors": {
    "user_id": [
      "The selected user id is invalid."
    ],
    "theme_options": [
      "The theme options field is required."
    ]
  }
}

Errors

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

Example request

curl --request POST \
  --url "https://production-api.shoutaboutus.com/api/v1/account/white-label/theme/save" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json' \
  --form 'user_id=3' \
  --form 'company_id=123' \
  --form 'theme_options={"mode":"system","skin":"default","primaryColor":"#f1874c"}' \
  --form 'logo_image=@logo_image.png'

Did this page help you?