Uploads an image to public storage blob. Not member dependent or anything

POST /api/images

Success: 200 OK

Overview

Uploads a general-purpose image to public storage and returns the file name it was stored under. Use it for images that are not tied to a member — a site logo, a promotional banner, an organisation's branding.

Send the request as multipart/form-data with a single part:

PartRequiredDescription
imageFileYesThe image itself. JPEG and PNG only, and the check reads the file's actual header rather than trusting its extension or Content-Type, so renaming another format to .jpg is rejected. Maximum 10 MB; an empty file is rejected too.

You do not choose the name. Unlike Upload activity image, this endpoint takes no name parameter: it generates a fresh GUID and appends the extension from your uploaded file's name, so a file called logo.PNG is stored as something like 3f2b8c14-9a77-4c1e-b0d5-7e6f2a4d9c31.PNG. The extension is copied verbatim, including its case. As a result every upload creates a new file and nothing can ever be overwritten — there is no 409 on this endpoint, and re-uploading the same picture simply leaves two copies. Delete the old one yourself if you are replacing something.

The response is a bare JSON string, not an object — just the generated file name, with no surrounding braces and no URL. You have to build the public URL yourself from the file name and the public storage base address for your environment; this endpoint does not return one. That differs from the activity image upload, which returns both.

Images stored here are publicly readable by anyone with the link, without authentication. Do not upload anything that identifies a member.

Endpoint

POST {base_url}/api/images

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Sample request

cURL
curl -X POST '{base_url}/api/images' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -F 'imageFile=@site-logo.png'

Sample response

200 OK
"3f2b8c14-9a77-4c1e-b0d5-7e6f2a4d9c31.png"

Errors

StatusMeaningWhen
400Bad requestimageFile is missing — An image file is required.
400Bad requestimageFile is larger than 10 MB — File "{name}" is {size}MB in size which is larger than the maximum size of 10MB. The name in the message is truncated to 20 characters.
400Bad requestimageFile is zero bytes — File "{name}" is empty and cannot be uploaded.
400Bad requestimageFile is not a JPEG or PNG by its actual file header — File "{name}" is not a valid image, only image files of type "jpg", "jpeg" and "png" can be saved.
500Internal server errorThe image could not be saved. The response body is empty. Because the generated name is always unique, a name collision is not a cause.

This page as markdown · All pages · llms.txt