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,widthandheight(images only),created,modified.POST .../assets— upload a file asmultipart/form-data: the file in thefilepart, and the form fieldsasset_type,title,descriptionandis_primary(trueorfalse). Returns201. Alogo,banneroriconmust 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 is422with areason(invalid_content_type,oversizedorinvalid_dimensions) and adetail.PATCH .../assets/{id}— a JSON body of only the details you are changing (asset_type,title,description,is_primary).nullis422. The file itself cannot be replaced: upload the new one and delete the old. Changing the type tologo,banneroriconchecks the stored file is an image.DELETE .../assets/{id}— delete the file (204).
Verify
GET .../assetsagain 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.- Confirm no file you did not mean to touch changed or disappeared.