Skip to main content
POST
Upload a file

Authorizations

Authorization
string
header
required

Your API key, sent bare. See Authentication.

Body

multipart/form-data
file
file
required

The image, a PNG, JPEG, GIF, WebP or SVG of at most 10 MB.

purpose
enum<string>
required

What the file is for. brand_kit: an image for a brand kit.

Available options:
brand_kit
workspace_id
string

The workspace the file belongs to. Optional when the key belongs to exactly one workspace, which is then used. A wks_ id; integer workspace ids are still accepted.

Example:

"wks_01k6a2r9s8x7c2dvq3m5n6p4ab"

Response

File uploaded.

id
string
required

File ID, beginning with file_.

object
string
required

Always file.

purpose
enum<string>
required

What the file is for. brand_kit: an image for a brand kit.

Available options:
brand_kit
workspace_id
string
required

The workspace the file belongs to, a wks_ id.

filename
string
required

The name the file was uploaded with. Its extension is replaced when it does not match the image type.

content_type
enum<string>
required

The image type, read from the file's bytes.

  • image/png: PNG.
  • image/jpeg: JPEG.
  • image/gif: GIF.
  • image/webp: WebP.
  • image/svg+xml: SVG.
Available options:
image/png,
image/jpeg,
image/gif,
image/webp,
image/svg+xml
size
integer
required

Size in bytes.

url
string<uri>
required

A signed URL to download the file, valid for one year. Every read returns a fresh one. An SVG is served as a download, never inline.

created_at
string<date-time>
required

When the file was uploaded, in ISO 8601.