Skip to main content
POST
Begin an asset upload

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Body

application/json
websiteId
string
required
Minimum string length: 1
kind
enum<string>
required
Available options:
image,
file
filename
string
required
Required string length: 1 - 255
mimeType
string
required
Maximum string length: 255
byteSize
integer
required
Required range: x <= 9007199254740991
description
string

One sentence: subject, visible text, style, intended use.

Required string length: 1 - 500
category
enum<string>

What the image is. Images only.

Available options:
logo,
icon,
photo,
illustration,
screenshot,
graphic,
background,
other
listed
boolean

Pass false to keep the asset out of lists until the website uses it; it is then never described automatically. Cactal sets this for images attached to agent messages.

Response

The pending asset id and presigned upload instructions. Next: PUT the file bytes to upload.url, then call websiteAssets.finalize with assetId.

assetId
string
required

Id of the pending asset. After uploading the bytes, pass it to websiteAssets.finalize.

upload
object
required

Presigned instructions for uploading the file bytes.