Assets

Begin an asset upload

Step 1 of the two-step upload: validates kind, mimeType, and byteSize, creates the asset as pending, and returns presigned upload instructions. Include a one-line description (and category for images) so the asset can be found later. PUT the raw bytes to upload.url with exactly upload.headers within 15 minutes, then finalize. image accepts PNG, JPEG, WebP, GIF, AVIF, SVG, BMP, and ICO up to 10 MiB; file accepts documents, fonts, audio, video, images, ZIP, .riv, and .lottie up to 100 MiB. Unfinalized uploads are cleaned up after about an hour.

post/websiteAssets

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/websiteAssets
  • Auth: HTTP bearer

Request body

websiteIdstring required
kind'image' | 'file' required
filenamestring required
mimeTypestring required
byteSizeinteger required
descriptionstring

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

category'logo' | 'icon' | 'photo' | 'illustration' | 'screenshot' | 'graphic' | 'background' | 'other'

What the image is. Images only.

listedboolean

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.

assetIdstring required

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

Changes

No recorded changes to this operation across all 1 revision of this API.