Skip to main content
Programmatic equivalent of the brand’s Assets / Media page in the dashboard (the list, and its upload and edit forms). The page and the API write through the same service and the same image check, so a file one accepts the other accepts, and a file one refuses the other refuses. A brand asset is a file in the brand’s media library with a type (logo, banner, icon, document or other), an optional title and description, and at most one primary file per type. The brand’s own logo, shown on its profile and resolver pages, is set separately with POST /brands/api/v1/brands/{brand_id}/logo (see claim-brand).

When to use

  • The brand’s media library is empty or missing its logos, banners or press documents.
  • A file’s title, description, type or primary flag is wrong.
  • A file is out of date.

Auth

X-API-Key header or OAuth token. Reading needs any member of the organization that owns the brand (or any API key of it). Writing needs an OWNER, MANAGER or EDITOR (or an API key with the EDITOR role or above): a read-only key gets 403. A brand of an organization the caller does not belong to is 404.

Flow

  • GET .../assets — every file, by type, the primary of each type first: id, asset_type, title, description, is_primary, url, width and height (images only), created, modified.
  • POST .../assets — upload a file as multipart/form-data: the file in the file part, and the form fields asset_type, title, description and is_primary (true or false). Returns 201. A logo, banner or icon must be an image Closient accepts: JPEG, PNG, GIF, WebP or BMP, read from the file’s own bytes, at most 20 MB and 8000 px on either side. Anything else is 422 with a reason (invalid_content_type, oversized or invalid_dimensions) and a detail.
  • PATCH .../assets/{id} — a JSON body of only the details you are changing (asset_type, title, description, is_primary). null is 422. The file itself cannot be replaced: upload the new one and delete the old. Changing the type to logo, banner or icon checks the stored file is an image.
  • DELETE .../assets/{id} — delete the file (204).
Marking a file primary demotes the current primary of its type.

Verify

  1. GET .../assets again and confirm each file you uploaded or changed reads back with the type and details you intended, and at most one file of each type is primary.
  2. Confirm no file you did not mean to touch changed or disappeared.