API Reference

Files

Upload an image or video and use it as an asset value on a CMS entry.

post/v1/files/upload

Uploads a single file and returns a stored asset. Use the returned object as the value of an asset field on a CMS entry.

Unlike every other endpoint, this one takes multipart/form-data rather than JSON. Send the file as a part named file, and do not set Content-Type yourself — let your HTTP client set it so the multipart boundary is correct.

curl -X POST 'https://api.superfunnel.ai/v1/files/upload' \
  -H 'x-api-key: Bearer YOUR_API_TOKEN' \
  -F 'file=@./hero.jpg'

One file per request

Only the first file part is read. Upload files one at a time.

Using the result

Pass the returned object straight through as an entry value:

{
  "values": {
    "hero_image": {
      "assetId": "stored-asset-id",
      "url": "https://storage.googleapis.com/.../hero.jpg",
      "type": "image"
    }
  }
}

Request body

filestringrequired

The file to upload, sent as a `multipart/form-data` part named `file`.

Response · 200

assetIdstringrequired

Use with `url` and `type` as an `asset` field value on a CMS entry.

urlstringrequired
typeenum

Either `image` or `video`, detected from the uploaded file.

One of: image, video

namestring
widthnumber
heightnumber

Example response

{
  "assetId": "stored-asset-id",
  "url": "https://storage.googleapis.com/.../hero.jpg",
  "type": "image",
  "name": "hero.jpg",
  "width": 1600,
  "height": 900
}

Errors: 400, 401, 404, 405, 429, 500. See Errors for the response shape.

postTry it
/v1/files/upload

Stored in this browser tab only. Requests go directly to the API — the token never reaches the docs site.

Add a token to send a request.

https://api.superfunnel.ai/v1/files/upload

curl -X POST 'https://api.superfunnel.ai/v1/files/upload' \
  -H 'x-api-key: Bearer YOUR_API_TOKEN'