Sites
Create, change, publish and delete sites.
The site schema
/schemaWhat a SiteSpec may contain for a theme: the theme’s tokens and forms, every block type with its fields, and the SiteSpec JSON Schema. Use it to write a whole site for POST /sites, or valid blocks for pages. No key needed.
Query parameters
themestringA theme id. Default: the base theme.
Response 200
versionstringrequiredblocksarrayrequiredsiteSpecanyrequired
Errors
- 422The body is invalid; details say which values.
Try itRead-only. Sends a real request with your key.
curl https://api.unvop.com/v1/schemaconst res = await fetch('https://api.unvop.com/v1/schema');
const data = await res.json();import requests
res = requests.get(
"https://api.unvop.com/v1/schema",
)
data = res.json(){
"version": "v_123",
"blocks": [
{}
],
"siteSpec": {}
}Create a site
/sitesCreate a site from a SiteSpec you wrote, or from the base template with just a name. To have Unvop research, design and write the whole site from a description, start a build with POST /builds instead. Add ?dryRun=1 to validate without creating anything.
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 JSON
specobjectA whole SiteSpec (see GET /schema). Leave it out to start from the base template.
namestringat least 1 characters · up to 120 characters
hostnamestringA web address for the site. Without one, a free subdomain is assigned when the platform has one.
ownerobjectInvite this person as the owner. They get a link to set their password.
2 child fields
emailstringrequiredemail
namestringup to 120 characters
publishbooleandefault true
Response 201
siteobjectrequirednullableA website.
6 child fields
idstringrequirednamestringrequiredhostnamesarray of stringsrequiredThe web addresses the site answers at.
themestringrequiredsettingsobjectrequiredNavigation, footer, organization, SEO, tokens, design and more.
createdAtstringrequiredAn ISO 8601 timestamp.
urlsobjectrequired4 child fields
sitestringrequirednullableadminstringrequiredsetupstringrequirednullablepreviewstringrequirednullable
warningsarray of objectsrequired2 child fields
pathstringrequiredmessagestringrequired
dryRunbooleanrequired
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).
- 409It conflicts with the current state.
- 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 \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"name": "Harbour Bakery",
"owner": {
"email": "owner@example.com",
"name": "Sam"
}
}'const res = await fetch('https://api.unvop.com/v1/sites', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
name: "Harbour Bakery",
owner: {
email: "owner@example.com",
name: "Sam"
}
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.unvop.com/v1/sites",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
json={
"name": "Harbour Bakery",
"owner": {
"email": "owner@example.com",
"name": "Sam",
},
},
)
data = res.json(){
"site": {
"id": "site_123",
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev"
],
"theme": "studio",
"settings": {},
"createdAt": "2026-11-20T08:00:00.000Z"
},
"urls": {
"site": "…",
"admin": "…",
"setup": "…",
"preview": "…"
},
"warnings": [],
"dryRun": false
}List sites
/sitesThe sites this key can reach, newest first. A site key sees its one site; an account key or OAuth grant sees the account’s sites it was given.
Query parameters
limitintegerHow many to return (default 50).
min 1 · max 200
cursorstringThe cursor from the previous page.
Response 200
itemsarray of objectsrequired6 child fields
idstringrequirednamestringrequiredhostnamesarray of stringsrequiredThe web addresses the site answers at.
themestringrequiredsettingsobjectrequiredNavigation, footer, organization, SEO, tokens, design and more.
createdAtstringrequiredAn 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).
- 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 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites', {
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.unvop.com/v1/sites",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"items": [
{
"id": "site_123",
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev"
],
"theme": "studio",
"settings": {},
"createdAt": "2026-11-20T08:00:00.000Z"
}
],
"cursor": null,
"total": 1
}Get a site
/sites/{siteId}One site with its settings.
Path parameters
siteIdstringrequiredThe site’s id.
Response 200
idstringrequirednamestringrequiredhostnamesarray of stringsrequiredThe web addresses the site answers at.
themestringrequiredsettingsobjectrequiredNavigation, footer, organization, SEO, tokens, design and more.
createdAtstringrequiredAn 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.
- 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 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123', {
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",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"id": "site_123",
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev"
],
"theme": "studio",
"settings": {},
"createdAt": "2026-11-20T08:00:00.000Z"
}Update a site
/sites/{siteId}Rename the site, change its web addresses, set brand tokens, the logo and tagline, or replace parts of its settings. Only the fields you send change. Brand tokens, the logo, theme, nav and footer save as a site-wide draft, as in the dashboard: the live site keeps its current look until you publish (POST /sites/{siteId}/publish, or publishing any page). The response shows the settings as they will look once published.
Path parameters
siteIdstringrequiredThe site’s id.
Request body JSON
namestringat least 1 characters · up to 120 characters
hostnamesarray of stringsup to 10 items
brandobjectBrand tokens (theme colours and fonts), the logo and the tagline.
3 child fields
tokensmap of stringlogoUrlstringup to 2,000 characters
taglinestringup to 200 characters
settingsobjectReplace these settings: tagline, nav, footer, organization, seo, theme, crm. nav, footer and theme save as a draft until you publish.
Response 200
idstringrequirednamestringrequiredhostnamesarray of stringsrequiredThe web addresses the site answers at.
themestringrequiredsettingsobjectrequiredNavigation, footer, organization, SEO, tokens, design and more.
createdAtstringrequiredAn 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.
- 409It conflicts with the current state.
- 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 \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev"
]
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Harbour Bakery",
hostnames: [
"harbour-bakery.unvop.dev"
]
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.unvop.com/v1/sites/site_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev",
],
},
)
data = res.json(){
"id": "site_123",
"name": "Harbour Bakery",
"hostnames": [
"harbour-bakery.unvop.dev"
],
"theme": "studio",
"settings": {},
"createdAt": "2026-11-20T08:00:00.000Z"
}Delete a site
/sites/{siteId}Delete a site. Add ?confirm=<siteId> to show you mean it. By default the site is hidden and its addresses released; add &hard=1 to remove it and all its data permanently. Needs a platform key.
Path parameters
siteIdstringrequiredThe site’s id.
Query parameters
confirmstringrequiredThe site id again.
hardstring1 to delete permanently.
One of
1
Response 200
oktruerequireddeletedstringrequiredOne of
softhard
Errors
- 400The request is malformed.
- 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.
- 410Gone.
- 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 DELETE https://api.unvop.com/v1/sites/site_123?confirm=site_123 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123?confirm=site_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?confirm=site_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true,
"deleted": "soft"
}Publish every page
/sites/{siteId}/publishPublish the draft of every page at once, and the site-wide draft (site style, logo, menu and footer changes) with them. settings lists the parts of the site-wide draft that went live (empty when there was none). To publish one page, use POST /sites/{siteId}/pages/{page}/publish, which also publishes the site-wide draft.
Path parameters
siteIdstringrequiredThe site’s id.
Response 200
oktruerequiredpublishedintegerrequiredsettingsarray of stringsrequiredOne of
stylelogomenufooter
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 POST https://api.unvop.com/v1/sites/site_123/publish \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/publish",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true,
"published": 1,
"settings": [
"style"
]
}