Media
Images, videos and files.
List media
/sites/{siteId}/mediaUploaded images, videos and files, newest first (up to 500). Search with q; filter with type.
Path parameters
siteIdstringrequiredThe site’s id.
Query parameters
qstringtypestringOne of
imagevideoother
Response 200
itemsarray of objectsrequired9 child fields
idstringrequiredurlstringrequiredA site-relative address, like /media/<key>.
filenamestringrequiredmimestringrequiredsizenumberrequiredwidthnumberheightnumberaltstringrequiredcreatedAtstringrequiredAn ISO 8601 timestamp.
cursorstringnullablePass as ?cursor= to get the next page. Null when there are no more.
totalintegerHow 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"const res = await fetch('https://api.unvop.com/v1/sites/site_123/media', {
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.unvop.com/v1/sites/site_123/media",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"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
/sites/{siteId}/mediaAdd 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
siteIdstringrequiredThe site’s id.
Headers
Idempotency-KeystringSend 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
urlstringrequireduri · up to 2,000 characters
altstringup to 500 characters
filenamestringup to 200 characters
Response 201
idstringrequiredurlstringrequiredA site-relative address, like /media/<key>.
filenamestringrequiredmimestringrequiredsizenumberrequiredwidthnumberheightnumberaltstringrequiredcreatedAtstringrequiredAn 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"const form = new FormData();
form.append('file', fileBlob, 'sourdough.jpg');
const res = await fetch('https://api.unvop.com/v1/sites/site_123/media', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
body: form,
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/media",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
files={"file": open("sourdough.jpg", "rb")},
)
data = res.json(){
"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
/sites/{siteId}/media/{mediaId}Change a file’s alt text, which screen readers and search engines read.
Path parameters
siteIdstringrequiredThe site’s id.
mediaIdstringrequired
Request body JSON
altstringrequiredup to 500 characters
Response 200
idstringrequiredurlstringrequiredA site-relative address, like /media/<key>.
filenamestringrequiredmimestringrequiredsizenumberrequiredwidthnumberheightnumberaltstringrequiredcreatedAtstringrequiredAn 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"
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/media/med_123', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
alt: "A sourdough loaf on the counter"
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.unvop.com/v1/sites/site_123/media/med_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"alt": "A sourdough loaf on the counter",
},
)
data = res.json(){
"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
/sites/{siteId}/media/{mediaId}Delete a file. Pages that still use it show nothing in its place.
Path parameters
siteIdstringrequiredThe 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"const res = await fetch('https://api.unvop.com/v1/sites/site_123/media/med_123', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.delete(
"https://api.unvop.com/v1/sites/site_123/media/med_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true
}