Menu

Upload an image

POST/v1/assets

Requires an API key with the templates:write scope. About keys and scopes

Uploads one PNG, JPEG or GIF of at most 2 MB for image blocks, as a multipart file part. The returned url is public and stable, so it can go straight into a template.

Returns

Returns 201 Created with a Asset in data. Otherwise returns an error; Errors lists every code and which to retry.

idstringrequired

uuid

filenamestringrequired
urlstringrequired

The public address to use as an image src.

uri

mimeTypestringrequired

The image format.

one of image/png, image/jpeg, image/gif

bytesintegerrequired

File size in bytes.

min > 0 · max 9007199254740991

widthintegerrequired

Width in px.

min > 0 · max 9007199254740991

heightintegerrequired

Height in px.

min > 0 · max 9007199254740991

createdAtstringrequired

date-time