Developers Dashboard

Images, videos and files.

List media

GET/sites/{siteId}/media

Uploaded images, videos and files, newest first (up to 500). Search with q; filter with type.

Path parameters

  • siteIdstringrequired

    The site’s id.

Query parameters

  • qstring
  • typestring

    One of image video other

Response 200

  • itemsarray of objectsrequired
    9 child fields
    • idstringrequired
    • urlstringrequired

      A site-relative address, like /media/<key>.

    • filenamestringrequired
    • mimestringrequired
    • sizenumberrequired
    • widthnumber
    • heightnumber
    • altstringrequired
    • createdAtstringrequired

      An ISO 8601 timestamp.

  • cursorstringnullable

    Pass as ?cursor= to get the next page. Null when there are no more.

  • totalinteger

    How many there are in all, when the list knows.

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 422The body is invalid; details say which values.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itRead-only. Sends a real request with your key.
curl https://api.unvop.com/v1/sites/site_123/media \
  -H "Authorization: Bearer $UNVOP_KEY"
Response 200
{
  "items": [
    {
      "id": "med_123",
      "url": "https://harbour-bakery.unvop.dev",
      "filename": "sourdough.jpg",
      "mime": "image/jpeg",
      "size": 184320,
      "width": 1600,
      "height": 1067,
      "alt": "A sourdough loaf on the counter",
      "createdAt": "2026-11-20T08:00:00.000Z"
    }
  ],
  "cursor": null,
  "total": 1
}

Upload media

POST/sites/{siteId}/media
Scopemedia:writeIdempotent with a key

Add an image, video or file: send it as multipart/form-data (field "file", optional "alt"), or send JSON { url, alt } and Unvop downloads it (https only). Up to 15 MB. JPG, PNG, WebP, GIF, AVIF, SVG, PDF, MP4 and WebM. Use the returned url in image props.

Path parameters

  • siteIdstringrequired

    The site’s id.

Headers

  • Idempotency-Keystring

    Send the same key to repeat this request safely; the first answer is replayed for 24 hours.

    up to 200 characters

Request body multipart/form-data or JSON

  • urlstringrequired

    uri · up to 2,000 characters

  • altstring

    up to 500 characters

  • filenamestring

    up to 200 characters

Response 201

  • idstringrequired
  • urlstringrequired

    A site-relative address, like /media/<key>.

  • filenamestringrequired
  • mimestringrequired
  • sizenumberrequired
  • widthnumber
  • heightnumber
  • altstringrequired
  • createdAtstringrequired

    An ISO 8601 timestamp.

  • absoluteUrlstringrequired

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 413Too large.
  • 415That file type isn’t supported.
  • 422The body is invalid; details say which values.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl https://api.unvop.com/v1/sites/site_123/media \
  -H "Authorization: Bearer $UNVOP_KEY" \
  -F "file=@sourdough.jpg" \
  -F "alt=A sourdough loaf on the counter"
Response 201
{
  "id": "med_123",
  "url": "https://harbour-bakery.unvop.dev",
  "filename": "sourdough.jpg",
  "mime": "image/jpeg",
  "size": 184320,
  "width": 1600,
  "height": 1067,
  "alt": "A sourdough loaf on the counter",
  "createdAt": "2026-11-20T08:00:00.000Z",
  "absoluteUrl": "https://harbour-bakery.unvop.dev"
}

Describe media

PATCH/sites/{siteId}/media/{mediaId}

Change a file’s alt text, which screen readers and search engines read.

Path parameters

  • siteIdstringrequired

    The site’s id.

  • mediaIdstringrequired

Request body JSON

  • altstringrequired

    up to 500 characters

Response 200

  • idstringrequired
  • urlstringrequired

    A site-relative address, like /media/<key>.

  • filenamestringrequired
  • mimestringrequired
  • sizenumberrequired
  • widthnumber
  • heightnumber
  • altstringrequired
  • createdAtstringrequired

    An ISO 8601 timestamp.

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 422The body is invalid; details say which values.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X PATCH https://api.unvop.com/v1/sites/site_123/media/med_123 \
  -H "Authorization: Bearer $UNVOP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "alt": "A sourdough loaf on the counter"
  }'
Response 200
{
  "id": "med_123",
  "url": "https://harbour-bakery.unvop.dev",
  "filename": "sourdough.jpg",
  "mime": "image/jpeg",
  "size": 184320,
  "width": 1600,
  "height": 1067,
  "alt": "A sourdough loaf on the counter",
  "createdAt": "2026-11-20T08:00:00.000Z"
}

Delete media

DEL/sites/{siteId}/media/{mediaId}

Delete a file. Pages that still use it show nothing in its place.

Path parameters

  • siteIdstringrequired

    The site’s id.

  • mediaIdstringrequired

Response 200

  • oktruerequired

Errors

  • 401No key, or the key isn’t valid.
  • 403The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).
  • 404Not found, or not reachable with this key.
  • 429Too many requests; wait for RateLimit-Reset seconds.
Try itSends a real request. Asks before it changes anything.
curl -X DELETE https://api.unvop.com/v1/sites/site_123/media/med_123 \
  -H "Authorization: Bearer $UNVOP_KEY"
Response 200
{
  "ok": true
}