Set the workspace image

Set the workspace image

PUT/api/v1/workspace/image

PUT /workspace/image
curl -X PUT 'https://www.unitpost.com/api/v1/workspace/image' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
Response · 200
{
  "object": "workspace",
  "id": "id_123",
  "name": "Example",
  "slug": "string",
  "image_url": "https://example.com"
}

Replace the workspace image (its avatar in the dashboard, and the email logo when there's no brand logo), from a public https url or base64 data (PNG, JPEG, GIF or WebP, up to 5 MB and 16,384 px a side). Requires the branding:write capability.

Request body4 fields
FieldTypeDescription
urlstringA public https image to fetch (no redirects, no private addresses). PNG, JPEG, GIF or WebP, up to 5 MB and 16,384 px a side (50 megapixels at most); anything else is a 422 naming `url`.
datastringThe image bytes, base64 (no `data:` prefix). Base64 adds a third, and a request over ~6 MB is refused before it arrives, so this fits about 4 MB of image; send larger images (up to 5 MB) by `url`. At most 16,384 px a side and 50 megapixels; anything else is a 422 naming `data`.
content_typeenumimage/png | image/jpeg | image/gif | image/webpRequired with `data`; refused with `url` (the server sends the type).
filenamestringShown in the library. Defaults to the URL's file name, or `image`.
Response · 200 fields5 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
namerequiredstring—
slugrequiredstring—
image_urlrequiredstring | nullThe workspace image (its avatar in the dashboard).
200400401403422429502503

Search docs and guides

Search the docs and product guides.