API Reference
Files
Upload an image or video and use it as an asset value on a CMS entry.
/v1/files/uploadUploads 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
filestringrequiredThe file to upload, sent as a `multipart/form-data` part named `file`.
Response · 200
assetIdstringrequiredUse with `url` and `type` as an `asset` field value on a CMS entry.
urlstringrequiredtypeenumEither `image` or `video`, detected from the uploaded file.
One of: image, video
namestringwidthnumberheightnumberExample 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.