Image, video and file fields store a URL rather than the file itself. This endpoint gives you an upload slot in Confirmed's storage. You can ask for a slot, send the file to it, and then save the URL you get back on the show it belongs to. Confirmed serves the files from a CDN, and the endpoint needs a read-write key.

Request

POST /api/v1/<production>/upload-file

Parameter Type Description
filename string Required. The name of the file you're about to upload.
curl -X POST "https://confirmed.show/api/v1/spectrum/upload-file?filename=promo.png" \
  -H "Authorization: Bearer <token>"

Response

{
  "upload_url": "https://storage.googleapis.com/...<signed>",
  "file_url": "https://st.confirmed.show/uploads/spectrum/api-uploads/A1B2C3-promo.png"
}
Field Description
upload_url Where to PUT the file. The link lasts fifteen minutes.
file_url Where the file will live once it's up. This is the one you save.

Sending the file

curl -X PUT "<upload_url>" \
  -H "Content-Type: image/png" \
  --upload-file promo.png

Then save file_url against a show, through the Shows API:

curl -X PUT https://confirmed.show/api/v1/spectrum/shows/nan3 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "meta": { "promo_image": "https://st.confirmed.show/uploads/spectrum/api-uploads/A1B2C3-promo.png" } }'

Anyone with the URL can open the file, so these files are effectively public. Confirmed stores each picture exactly as it arrives and doesn't crop it for you, so it's best to send it at the size you want. The preferred dimensions you set under Data & API only shape the crop box inside Confirmed.

Errors

Status What happened
400 The request carried no API token, or no filename.
401 We don't recognise that token.
403 The token can read but not write.