Assets overviewMenu
On this page

Assets

An asset is an image you upload for a template's image blocks, served from a public URL. Anyone with the URL can see it, so never upload anything private.

Endpoints

EndpointRequest
List assetsGET /v1/assets
Upload an imagePOST /v1/assets
Copy an image into the libraryPOST /v1/assets/import
Rename an assetPATCH /v1/assets/{id}
Delete an assetDELETE /v1/assets/{id}
Retrieve an asset's usageGET /v1/assets/{id}/usage

The Asset object

Asset example
{
  "id": "018f2a4e-6b1c-7d3e-9f40-37386ae05a6b",
  "type": "image",
  "name": "name_example",
  "filename": "filename_example",
  "url": "https://example.com",
  "mimeType": "image/png",
  "sizeBytes": 1,
  "width": 1,
  "height": 1,
  "createdAt": "2030-03-14T09:30:00Z"
}
idstringrequired

uuid

typestringrequired

The kind of file: image. More kinds, such as video, may be added: branch on type and keep the ones you do not know.

one of image

namestringrequired

The name the library shows.

filenamestringrequired

The file's name as uploaded or copied.

urlstringrequired

The file's public address, such as an image src.

uri

mimeTypestringrequired

The file's format.

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

sizeBytesintegerrequired

File size in bytes.

min > 0

widthintegerrequired

The file's width in px.

min > 0

heightintegerrequired

The file's height in px.

min > 0

createdAtstringrequired

date-time