Components
A site’s own section types made from a prompt, and React components on agency plans, with their versions, reviews and approvals.
- GET
/sites/{siteId}/componentsList section types and React components - POST
/sites/{siteId}/componentsCreate a section type by hand - POST
/sites/{siteId}/components/generateCreate a section type from a prompt - GET
/sites/{siteId}/components/{component}Get a component - PATCH
/sites/{siteId}/components/{component}Change a component - DEL
/sites/{siteId}/components/{component}Delete a component - GET
/sites/{siteId}/components/{component}/versionsList a component’s versions - POST
/sites/{siteId}/components/{component}/submitSend a React component for review - POST
/sites/{siteId}/components/{component}/publishPublish a version
List section types and React components
/sites/{siteId}/componentsThe site’s own kinds of section. Add one to a page with a block of its type (x-<key> or r-<key>) and props in the shape of its fields.
Path parameters
siteIdstringrequiredThe site’s id.
Query parameters
kindstringOne of
sectionreact
Response 200
itemsarray of objectsrequired7 child fields
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullable
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/components \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/components', {
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/components",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"items": [
{
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1
}
],
"cursor": null,
"total": 1
}Create a section type by hand
/sites/{siteId}/componentsA section type from its parts: fields, a template in the template language (layout elements plus <text field>, <multiline field>, <rich field>, <image field>, <link field>, <each field> and <if field>; no static text, scripts, styles or event attributes) and css, scoped and filtered. Refused with the problems listed when anything is unsafe.
Path parameters
siteIdstringrequiredThe site’s id.
Request body JSON
namestringrequiredup to 60 characters
descriptionstringup to 300 characters
fieldsarray of objectsrequired4 child fields
namestringrequiredlabelstringrequiredtypestringrequiredfieldsarray
templatestringrequiredcssstringsampleobject
Response 201
componentobjectrequired10 child fields
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
warningsarray of strings
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 https://api.unvop.com/v1/sites/site_123/components \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ana",
"fields": [
{
"name": "Ana",
"label": "Role",
"type": "richText",
"fields": [
{}
]
}
],
"template": "…"
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/components', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Ana",
fields: [
{
name: "Ana",
label: "Role",
type: "richText",
fields: [
{}
]
}
],
template: "…"
}),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/components",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"name": "Ana",
"fields": [
{
"name": "Ana",
"label": "Role",
"type": "richText",
"fields": [
{},
],
},
],
"template": "…",
},
)
data = res.json(){
"component": {
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
},
"warnings": []
}Create a section type from a prompt
/sites/{siteId}/components/generateDescribe a section ("a timeline of our history with a photo per year") and get a new section type for this site: fields, a safe template and scoped CSS in the site’s style, live at once. With kind "react" (agency plans) the agent writes a React component draft instead, which must be submitted and approved before it goes live. Takes about half a minute.
Path parameters
siteIdstringrequiredThe site’s id.
Request body JSON
promptstringrequiredat least 3 characters · up to 2,000 characters
kindstringOne of
sectionreact
Response 201
componentobjectrequired10 child fields
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
warningsarray of strings
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 https://api.unvop.com/v1/sites/site_123/components/generate \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes."
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/generate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
prompt: "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes."
}),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/components/generate",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
},
)
data = res.json(){
"component": {
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
},
"warnings": []
}Get a component
/sites/{siteId}/components/{component}A section type or React component by id or key, with its working copy, versions (and reviews) and the pages that use it.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
Response 200
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
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/components/component_123 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_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/components/component_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
}Change a component
/sites/{siteId}/components/{component}Section types: send instruction for a change in plain words (the agent makes it), or the full fields, template, css and sample to save by hand; either way a new version goes live. React components: send the draft (source, fields, sample, interactive, origins, name) or an instruction; the draft is saved, and nothing goes live until it is submitted and approved.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
Request body JSON
instructionstringup to 2,000 characters
Response 200
componentobjectrequired10 child fields
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
warningsarray of strings
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/components/component_123 \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"instruction": "…"
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_123', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
instruction: "…"
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.unvop.com/v1/sites/site_123/components/component_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"instruction": "…",
},
)
data = res.json(){
"component": {
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
},
"warnings": []
}Delete a component
/sites/{siteId}/components/{component}Deletes the component and its versions. Sections of this type disappear from the pages that use them.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
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/components/component_123 \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_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/components/component_123",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"ok": true
}List a component’s versions
/sites/{siteId}/components/{component}/versionsEvery version, newest first: who made and approved it, its review, and which one is live. Versions never change; publishing an older one is a rollback.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
Response 200
itemsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
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.
- 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/components/component_123/versions \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_123/versions', {
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/components/component_123/versions",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"items": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
],
"cursor": null,
"total": 1
}Send a React component for review
/sites/{siteId}/components/{component}/submitCompiles the draft, runs the static checks, renders it once in the sandbox and runs the AI review. The result is a pending version that an owner or admin approves with publishComponent.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
Response 201
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
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/components/component_123/submit \
-H "Authorization: Bearer $UNVOP_KEY"const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_123/submit', {
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/components/component_123/submit",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
)
data = res.json(){
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
}Publish a version
/sites/{siteId}/components/{component}/publishMakes version live. For a React component a pending version is approved first, recorded against the caller; an approved one is simply made live again (rollback). For a section type any version can be made live.
Path parameters
siteIdstringrequiredThe site’s id.
componentstringrequiredThe component id or key.
Request body JSON
versionintegerrequiredmin 1
Response 200
idstringrequiredkindstringrequiredOne of
sectionreactkeystringrequiredtypestringrequiredThe block type to use in page content: x-<key> for a section type, r-<key> for a React component.
namestringrequireddescriptionstringrequirednullableliveVersionintegerrequirednullabledraftanyrequiredThe working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}.
usedOnarray of objectsrequired3 child fields
idstringrequiredtitlestringrequiredslugstringrequired
versionsarray of objectsrequired7 child fields
versionintegerrequiredstatusstringrequiredOne of
pendingapprovedrejectedpromptstringrequirednullablereviewanyrequirednullableReact: the static findings and the AI review.
approvedBystringrequirednullableapprovedAtstringrequirednullablecreatedAtstringrequired
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 https://api.unvop.com/v1/sites/site_123/components/component_123/publish \
-H "Authorization: Bearer $UNVOP_KEY" \
-H "Content-Type: application/json" \
-d '{
"version": 1
}'const res = await fetch('https://api.unvop.com/v1/sites/site_123/components/component_123/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.UNVOP_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
version: 1
}),
});
const data = await res.json();import os, requests
res = requests.post(
"https://api.unvop.com/v1/sites/site_123/components/component_123/publish",
headers={"Authorization": f"Bearer {os.environ['UNVOP_KEY']}"},
json={
"version": 1,
},
)
data = res.json(){
"id": "id_123",
"kind": "section",
"key": "team",
"type": "richText",
"name": "Ana",
"description": "Building the homepage",
"liveVersion": 1,
"draft": {},
"usedOn": [
{
"id": "id_123",
"title": "About us",
"slug": "ana"
}
],
"versions": [
{
"version": 1,
"status": "pending",
"prompt": "Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes.",
"review": null,
"approvedBy": "…",
"approvedAt": "2026-11-20T08:00:00.000Z",
"createdAt": "2026-11-20T08:00:00.000Z"
}
]
}