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
| Endpoint | Request |
|---|---|
| List assets | GET /v1/assets |
| Upload an image | POST /v1/assets |
| Copy an image into the library | POST /v1/assets/import |
| Rename an asset | PATCH /v1/assets/{id} |
| Delete an asset | DELETE /v1/assets/{id} |
| Retrieve an asset's usage | GET /v1/assets/{id}/usage |
The Asset object
{
"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"
}idstringrequireduuid
typestringrequiredThe kind of file:
image. More kinds, such asvideo, may be added: branch ontypeand keep the ones you do not know.one of
imagenamestringrequiredThe name the library shows.
filenamestringrequiredThe file's name as uploaded or copied.
urlstringrequiredThe file's public address, such as an image
src.uri
mimeTypestringrequiredThe file's format.
one of
image/png,image/jpeg,image/gifsizeBytesintegerrequiredFile size in bytes.
min > 0
widthintegerrequiredThe file's width in px.
min > 0
heightintegerrequiredThe file's height in px.
min > 0
createdAtstringrequireddate-time