Documentation

/assets POST

Description

Create a new asset

Parameters

Name Type Description
asset_attachment io asset to upload

Response

Name Type Description
id integer id of the asset
filename string name of the file (basename + extension)
url string absolute url of the asset
created_at string date of the asset upload

Example

curl -X POST \
  -H "x-boxcab-site-handle: <your site handle>" \
  -H "x-boxcab-api-key: <your API key>" \
  -H "Content-Type: multipart/form-data" \
  -F "asset[asset_attachment][email protected]<path to your file>" \
  https://editor.boxcab.io/api/v1/assets