{"openapi":"3.1.0","info":{"title":"Unvop API","version":"1","summary":"Build, edit and run websites: pages, collections, media, contacts, forms, workflows, tools and AI builds.","description":"The Unvop platform API. Everything the dashboard can do with a site, from your own code or an AI assistant. Authenticate with an API key as `Authorization: Bearer unvop_live_…`. Errors are `{ \"error\": { \"code\", \"message\", \"details\" } }`. Lists answer `{ items, cursor }`: pass `cursor` back for the next page. POST creates accept an `Idempotency-Key`. Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.","contact":{"name":"Unvop","url":"https://unvop.com"}},"servers":[{"url":"https://api.unvop.com/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"Who you are calling as."},{"name":"Builds","description":"Build a whole site from a prompt with the AI pipeline, and follow it."},{"name":"Sites","description":"Create, change, publish and delete sites."},{"name":"Pages","description":"Pages, articles and the blocks inside them."},{"name":"Design","description":"Brand tokens and the site stylesheet."},{"name":"Components","description":"A site’s own section types made from a prompt, and React components on agency plans, with their versions, reviews and approvals."},{"name":"Collections","description":"A site’s own lists (menu, rooms, team, events), their entries and where they come from."},{"name":"Media","description":"Images, videos and files."},{"name":"Forms","description":"Forms and what people sent through them."},{"name":"Contacts","description":"The CRM: contacts, the pipeline and activity."},{"name":"Payments","description":"Payments taken through Stripe."},{"name":"Analytics","description":"How a site is doing: visits, pages, sources, devices, countries, leads, conversions, revenue, Google search, workflow runs and site health, each compared with the period before."},{"name":"Workflows","description":"Automations: a trigger and the steps it runs, and their runs."},{"name":"Tools","description":"Small internal apps over the site’s data."},{"name":"Connections","description":"Outside APIs, sheets and feeds the site reads from."},{"name":"Settings","description":"Site settings."},{"name":"Plugins","description":"Email, Stripe, SEO, analytics, booking, spam protection and more."},{"name":"Keys","description":"Platform API keys."}],"paths":{"/openapi.json":{"get":{"operationId":"getOpenApi","tags":["Account"],"summary":"The OpenAPI document","description":"This API described as OpenAPI 3.1: every endpoint, its scope, parameters, bodies, answers and errors. No key needed.\n\nNo key needed.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string"},"paths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["openapi","paths"],"additionalProperties":{}}}}}},"x-unvop-scope":"public","security":[]}},"/schema":{"get":{"operationId":"getSiteSchema","tags":["Sites"],"summary":"The site schema","description":"What 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.\n\nNo key needed.","parameters":[{"name":"theme","in":"query","required":false,"schema":{"type":"string"},"description":"A theme id. Default: the base theme."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"blocks":{"type":"array","items":{}},"siteSpec":{}},"required":["version","blocks","siteSpec"],"additionalProperties":{}}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"public","security":[]}},"/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Who am I","description":"The key or grant you are calling with: its kind, scopes, the sites it can reach, and whether AI builds are available.\n\nAny valid key.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["platform","site","account"]},"name":{"type":"string"},"siteId":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"sites":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"ai":{"type":"object","properties":{"available":{"type":"boolean"}},"required":["available"],"additionalProperties":false}},"required":["kind","name","siteId","scopes","sites","ai"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"any"}},"/sites":{"post":{"operationId":"createSite","tags":["Sites"],"summary":"Create a site","description":"Create 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.\n\nScope: `sites:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},{"type":"null"}]},"urls":{"type":"object","properties":{"site":{"type":["string","null"]},"admin":{"type":"string"},"setup":{"type":["string","null"]},"preview":{"type":["string","null"]}},"required":["site","admin","setup","preview"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"dryRun":{"type":"boolean"}},"required":["site","urls","warnings","dryRun"],"additionalProperties":{},"description":"The new site, with where to see and edit it."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"sites:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec":{"description":"A whole SiteSpec (see GET /schema). Leave it out to start from the base template.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"name":{"type":"string","minLength":1,"maxLength":120},"hostname":{"description":"A web address for the site. Without one, a free subdomain is assigned when the platform has one.","type":"string","pattern":"^([a-z0-9-]+\\.)+[a-z]{2,}$"},"owner":{"description":"Invite this person as the owner. They get a link to set their password.","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120}},"required":["email"]},"publish":{"default":true,"type":"boolean"}}},"example":{"name":"Harbour Bakery","owner":{"email":"owner@example.com","name":"Sam"}}}}}},"get":{"operationId":"listSites","tags":["Sites"],"summary":"List sites","description":"The 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.\n\nScope: `content:read`.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"How many to return (default 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous page."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Sites, newest first."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/sites/{siteId}":{"get":{"operationId":"getSite","tags":["Sites"],"summary":"Get a site","description":"One site with its settings.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"patch":{"operationId":"updateSite","tags":["Sites"],"summary":"Update a site","description":"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.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"hostnames":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^([a-z0-9-]+\\.)+[a-z]{2,}$"}},"brand":{"description":"Brand tokens (theme colours and fonts), the logo and the tagline.","type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"logoUrl":{"type":"string","maxLength":2000},"tagline":{"type":"string","maxLength":200}}},"settings":{"description":"Replace these settings: tagline, nav, footer, organization, seo, theme, crm. nav, footer and theme save as a draft until you publish.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}},"delete":{"operationId":"deleteSite","tags":["Sites"],"summary":"Delete a site","description":"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.\n\nScope: `sites:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"confirm","in":"query","required":true,"schema":{"type":"string"},"description":"The site id again."},{"name":"hard","in":"query","required":false,"schema":{"type":"string","enum":["1"]},"description":"1 to delete permanently."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"deleted":{"type":"string","enum":["soft","hard"]}},"required":["ok","deleted"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Gone.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"sites:write"}},"/sites/{siteId}/publish":{"post":{"operationId":"publishSite","tags":["Sites"],"summary":"Publish every page","description":"Publish 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.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"published":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"settings":{"type":"array","items":{"type":"string","enum":["style","logo","menu","footer"]}}},"required":["ok","published","settings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/settings":{"get":{"operationId":"getSettings","tags":["Settings"],"summary":"Get settings","description":"The site with its settings, theme tokens, public address and launch checklist, as the dashboard’s Settings shows them: with any unpublished site-wide draft applied, and draft naming what is waiting (null when the live site matches). GET /sites/{siteId} returns the live settings.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},"theme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokens":{"type":"array","items":{}}},"required":["id","name","tokens"],"additionalProperties":{}},"url":{"type":"string","description":"The site’s public address."},"launch":{"description":"The launch checklist."},"draft":{"description":"Site-wide changes saved but not live yet (site style, logo, menu, footer), or null. site.settings already includes them; publishing any page or POST /sites/{siteId}/publish puts them live.","anyOf":[{"type":"object","properties":{"areas":{"type":"array","items":{"type":"string","enum":["style","logo","menu","footer"]}},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["areas","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["site","theme","url","launch"],"additionalProperties":{},"description":"A site with its theme, address and launch checklist, its settings as they will look once published."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"patch":{"operationId":"updateSettings","tags":["Settings"],"summary":"Change settings","description":"Change the site’s name, addresses or settings (nav, footer, organization, seo, tokens, locations, menu, articles, design fonts). Settings you send replace those keys; others are kept. Same checks as the dashboard. The site style (tokens, logo, favicon, theme, design css, fonts and view transitions) and the menu and footer (nav, menu, footer) save as a site-wide draft: the live site is unchanged until you publish (POST /sites/{siteId}/publish or any page publish), and POST /sites/{siteId}/settings/discard throws the draft away. The name, addresses, organization (contact details), seo, locations, map and articles apply at once. Owners and admins only.\n\nScope: `settings:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},"theme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokens":{"type":"array","items":{}}},"required":["id","name","tokens"],"additionalProperties":{}},"url":{"type":"string","description":"The site’s public address."},"launch":{"description":"The launch checklist."},"draft":{"description":"Site-wide changes saved but not live yet (site style, logo, menu, footer), or null. site.settings already includes them; publishing any page or POST /sites/{siteId}/publish puts them live.","anyOf":[{"type":"object","properties":{"areas":{"type":"array","items":{"type":"string","enum":["style","logo","menu","footer"]}},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["areas","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["site","theme","url","launch"],"additionalProperties":{},"description":"A site with its theme, address and launch checklist, its settings as they will look once published."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"settings:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"hostnames":{"maxItems":10,"type":"array","items":{"type":"string"}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}}},"/sites/{siteId}/settings/discard":{"post":{"operationId":"discardSettingsDraft","tags":["Settings"],"summary":"Discard site-wide changes","description":"Throw away the unpublished site-wide draft (site style, logo, menu and footer changes) so the settings match the live site again. Pages’ drafts are not touched. Owners and admins only.\n\nScope: `settings:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},"theme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokens":{"type":"array","items":{}}},"required":["id","name","tokens"],"additionalProperties":{}},"url":{"type":"string","description":"The site’s public address."},"launch":{"description":"The launch checklist."},"draft":{"description":"Site-wide changes saved but not live yet (site style, logo, menu, footer), or null. site.settings already includes them; publishing any page or POST /sites/{siteId}/publish puts them live.","anyOf":[{"type":"object","properties":{"areas":{"type":"array","items":{"type":"string","enum":["style","logo","menu","footer"]}},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["areas","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["site","theme","url","launch"],"additionalProperties":{},"description":"A site with its theme, address and launch checklist, its settings as they will look once published."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"settings:write","x-unvop-role":"owner or admin"}},"/sites/{siteId}/settings/revisions":{"get":{"operationId":"listSettingsRevisions","tags":["Settings"],"summary":"List site-wide versions","description":"The last 50 published versions of the site style, logo, menu and footer, newest first, with the parts each publish changed (areas). The oldest may be what was live before the first site-wide publish.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"note":{"type":"string"},"areas":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"userName":{"type":"string"}},"required":["id","areas","createdAt"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/sites/{siteId}/settings/revisions/{revisionId}/restore":{"post":{"operationId":"restoreSettingsRevision","tags":["Settings"],"summary":"Restore a site-wide version","description":"Make a published version of the site style, logo, menu and footer the site-wide draft again. Publish to put it live; this is how a site-wide publish is undone. Owners and admins only.\n\nScope: `settings:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"},"description":"A revision id from GET /sites/{siteId}/settings/revisions."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},"theme":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokens":{"type":"array","items":{}}},"required":["id","name","tokens"],"additionalProperties":{}},"url":{"type":"string","description":"The site’s public address."},"launch":{"description":"The launch checklist."},"draft":{"description":"Site-wide changes saved but not live yet (site style, logo, menu, footer), or null. site.settings already includes them; publishing any page or POST /sites/{siteId}/publish puts them live.","anyOf":[{"type":"object","properties":{"areas":{"type":"array","items":{"type":"string","enum":["style","logo","menu","footer"]}},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["areas","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["site","theme","url","launch"],"additionalProperties":{},"description":"A site with its theme, address and launch checklist, its settings as they will look once published."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"settings:write","x-unvop-role":"owner or admin"}},"/sites/{siteId}/design":{"get":{"operationId":"getDesign","tags":["Design"],"summary":"Get the design","description":"The site’s look: brand tokens (with the theme’s token list and defaults), fonts, and the stylesheet (design.css) whole and split into its parts (sections/hero.css, layout/header.css and so on). Shows unpublished site-wide draft changes too, as the editor does.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"themeTokens":{"type":"array","items":{}},"fonts":{"type":"array","items":{}},"css":{"type":"string"},"parts":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"css":{"type":"string"}},"required":["path","css"],"additionalProperties":false}}},"required":["tokens","themeTokens","fonts","css","parts"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/sites/{siteId}/design/tokens":{"patch":{"operationId":"updateDesignTokens","tags":["Design"],"summary":"Change brand tokens","description":"Set brand tokens (colours, fonts, radius) by name. Token names come from themeTokens in GET /sites/{siteId}/design. They save as a site-wide draft: the editor and draft previews show them on every page, and the live site changes when you publish (POST /sites/{siteId}/publish or any page publish).\n\nScope: `design:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["tokens"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["tokens"]},"example":{"tokens":{"signal":"#0f766e"}}}}}}},"/sites/{siteId}/design/styles/{file}":{"put":{"operationId":"putDesignStyle","tags":["Design"],"summary":"Save one part of the stylesheet","description":"Replace one part of design.css, such as sections/hero.css, or add a new section part under sections/. The CSS must parse; unsafe rules are removed and listed in warnings. Send the version from a previous read to refuse the save if the part changed since. Editing CSS is limited to platform administrators, as in the dashboard’s Code area.\n\nScope: `design:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"file","in":"path","required":true,"schema":{"type":"string"},"description":"The part’s path inside site/styles/, like sections/hero.css."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"},"version":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["path","content","version"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"version":{"type":"string"}},"required":["content"]}}}}}},"/sites/{siteId}/blocks":{"get":{"operationId":"listBlockTypes","tags":["Pages"],"summary":"List block types","description":"Every block the site’s pages can use, with its fields (name, type, label, options), defaults and variants. Use it to build valid blocks for pages.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Block types."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/builds":{"post":{"operationId":"startBuild","tags":["Builds"],"summary":"Build a site from a prompt","description":"Start the full AI build: research, a design reference, the design system, copy, pages and images, then deploy, a proof pass and an audit. It takes several minutes and runs on its own; follow it with GET /builds/{buildId} or stream GET /builds/{buildId}/events. The same request sent twice within two minutes returns the build already running. You can have two builds running at once.\n\nScope: `generate`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not available on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","maxLength":8000,"description":"What the business does and who for, in two or three sentences or more. The more real detail, the better the site."},"name":{"description":"The business name.","type":"string","maxLength":120},"website":{"description":"The business’s current website. Research reads it for real details; enough on its own to start from.","type":"string","maxLength":300},"subdomain":{"description":"The free address to use, like \"harbour-bakery\" for harbour-bakery.<sites domain>. Check it with GET /subdomains/{name}.","type":"string","maxLength":40},"locale":{"description":"The site’s language, like en-GB or es.","type":"string","maxLength":20},"address":{"type":"string","maxLength":300},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200},"maps":{"description":"The business’s Google Maps listing.","type":"object","properties":{"placeId":{"type":"string"},"url":{"type":"string"}},"required":["placeId"]},"brand":{"description":"Colours and a note on the look you want.","type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"notes":{"type":"string","maxLength":1000}}},"logo":{"description":"An upload id from POST /builds/uploads/logo.","type":"string","maxLength":80},"icon":{"description":"A logo upload id to use as the site icon.","type":"string","maxLength":80},"inspiration":{"description":"Upload ids from POST /builds/uploads/inspiration: sites or pictures whose look you like.","maxItems":6,"type":"array","items":{"type":"string","maxLength":80}},"siteId":{"description":"Rebuild this site (you must own it) instead of making a new one.","type":"string"},"source":{"description":"Rebuild your own live website as an editable Unvop site.","type":"object","properties":{"url":{"type":"string"},"ownSite":{"type":"boolean","const":true,"description":"You confirm the site is your own."},"instructions":{"type":"string","maxLength":2000}},"required":["url","ownSite"]},"screenshot":{"description":"Rebuild a screenshot as an editable site.","type":"object","properties":{"upload":{"type":"string","description":"An upload id from POST /builds/uploads/screenshot."},"viewport":{"type":"object","properties":{"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"device":{"type":"string","enum":["desktop","tablet","mobile"]}},"required":["width","height","device"]},"instructions":{"type":"string","maxLength":2000}},"required":["upload","viewport"]}},"required":["prompt"]},"example":{"prompt":"Harbour Bakery is a family bakery in Falmouth. Sourdough, pastries and celebration cakes, open 7 to 3 every day, with a cafe upstairs looking over the harbour.","name":"Harbour Bakery","subdomain":"harbour-bakery"}}}}},"get":{"operationId":"listBuilds","tags":["Builds"],"summary":"List builds","description":"Your account’s 20 most recent builds, newest first.\n\nScope: `generate`.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Builds."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/builds/{buildId}":{"get":{"operationId":"getBuild","tags":["Builds"],"summary":"Get a build","description":"Where a build is: its status (queued, running, succeeded, failed), stage, a sentence on what it is doing, the images so far, and once deployed the site id and live address. A build that went quiet is picked back up.\n\nScope: `generate`.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/builds/{buildId}/events":{"get":{"operationId":"streamBuild","tags":["Builds"],"summary":"Stream a build’s progress","description":"Server-Sent Events: a \"build\" event with the build each time its stage or message changes, then \"done\" when it succeeds or fails. The stream closes after five minutes; reconnect to keep following. Send Accept: text/event-stream.\n\nScope: `generate`.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An event stream.","content":{"text/event-stream":{"schema":{"type":"string"},"x-event-schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/builds/{buildId}/cancel":{"post":{"operationId":"cancelBuild","tags":["Builds"],"summary":"Stop a build","description":"Stop a build in progress. Finished stages stay stored; nothing after this point runs or spends.\n\nScope: `generate`.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/builds/{buildId}/retry":{"post":{"operationId":"retryBuild","tags":["Builds"],"summary":"Pick a failed build back up","description":"Restart a failed build where it stopped. Finished stages are skipped, so only the failed stage and those after it run again.\n\nScope: `generate`.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"stage":{"type":"string","description":"The stage the build is in, like researching, designing, writing, building, deploying, reviewing, done."},"message":{"type":"string","description":"What it is doing now, in a sentence."},"prompt":{"type":"string"},"siteId":{"description":"The site, once deployed.","type":["string","null"]},"hostname":{"type":["string","null"]},"url":{"description":"The live site, once deployed.","type":["string","null"]},"referenceUrl":{"description":"The design reference image, once drawn.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":"string"},"placement":{"type":"string"}},"required":["url","alt","placement"],"additionalProperties":false}},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","status","stage","message","prompt","siteId","hostname","url","referenceUrl","images","error","errorCode","createdAt","updatedAt"],"additionalProperties":{},"description":"An AI site build: the full research, design, writing, building, deploy and review pipeline."}},"required":["job"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/builds/uploads/{kind}":{"post":{"operationId":"uploadBuildFile","tags":["Builds"],"summary":"Upload a file for a build","description":"Upload the owner’s logo (PNG, JPEG, WebP or SVG), an inspiration image, or a screenshot to rebuild, as multipart/form-data in a \"file\" field. Returns an upload id to pass to POST /builds as logo, icon, inspiration or screenshot.upload. Uploads stay private to your account.\n\nScope: `generate`.","parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string"},"description":"logo, inspiration or screenshot."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":{}}},"required":["upload"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"alt":{"type":"string"}},"required":["file"]}}}}}},"/subdomains/{name}":{"get":{"operationId":"checkSubdomain","tags":["Builds"],"summary":"Check a free address","description":"Whether a free address (name.<sites domain>) is available for a new site.\n\nScope: `generate`.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"hostname":{"type":"string"},"url":{"type":["string","null"]},"reason":{"type":"string"}},"required":["available"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate"}},"/keys":{"get":{"operationId":"listKeys","tags":["Keys"],"summary":"List API keys","description":"Every API key that hasn’t been revoked: platform, account and site keys. Needs a platform key.\n\nScope: `keys:write`.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"The public part shown in the dashboard."},"kind":{"type":"string","enum":["site","platform","account"]},"scopes":{"type":"array","items":{"type":"string"}},"siteId":{"type":["string","null"]},"siteIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastUsedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]}},"required":["id","name","prefix","kind","scopes","siteId","siteIds","createdAt","lastUsedAt"],"additionalProperties":{},"description":"An API key, without its secret."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"API keys."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"keys:write"},"post":{"operationId":"createKey","tags":["Keys"],"summary":"Create an API key","description":"Make a key. The key itself is returned once, in key; store it safely. Needs a platform key.\n\nScope: `keys:write`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"item":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","description":"The public part shown in the dashboard."},"kind":{"type":"string","enum":["site","platform","account"]},"scopes":{"type":"array","items":{"type":"string"}},"siteId":{"type":["string","null"]},"siteIds":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastUsedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]}},"required":["id","name","prefix","kind","scopes","siteId","siteIds","createdAt","lastUsedAt"],"additionalProperties":{},"description":"An API key, without its secret."}},"required":["key","item"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"keys:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["platform","site","account"],"description":"platform: every site. site: one site (siteId). account: acts as the account that made the key."},"siteId":{"type":"string"},"siteIds":{"description":"Account keys: limit to these sites.","maxItems":200,"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string","enum":["sites:write","content:read","content:write","contacts:read","generate","contacts:write","media:write","design:write","payments:read","workflows:read","workflows:write","tools:read","tools:write","connections:read","connections:write","settings:write","keys:write","analytics:read"]}}},"required":["name","kind"]}}}}}},"/keys/{keyId}":{"delete":{"operationId":"revokeKey","tags":["Keys"],"summary":"Revoke an API key","description":"Revoke a key. Requests with it fail from now on. Needs a platform key.\n\nScope: `keys:write`.","parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"keys:write"}},"/generate":{"post":{"operationId":"generateSite","tags":["Builds"],"summary":"Generate a site in one call (legacy)","description":"The older one-call generator: one model writes a SiteSpec and the site is created when it returns. It has no research, design reference, images or review. Prefer POST /builds, which runs the full pipeline. Send Accept: text/event-stream for progress events.\n\nScope: `generate`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The web addresses the site answers at."},"theme":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Navigation, footer, organization, SEO, tokens, design and more."},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","name","hostnames","theme","settings","createdAt"],"additionalProperties":{},"description":"A website."},{"type":"null"}]},"urls":{"type":"object","properties":{"site":{"type":["string","null"]},"admin":{"type":"string"},"setup":{"type":["string","null"]},"preview":{"type":["string","null"]}},"required":["site","admin","setup","preview"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"dryRun":{"type":"boolean"}},"required":["site","urls","warnings","dryRun"],"additionalProperties":{},"description":"The new site, with where to see and edit it."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Not available on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"generate","deprecated":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":20,"maxLength":8000},"name":{"type":"string","minLength":1,"maxLength":120},"locale":{"type":"string","maxLength":20},"hostname":{"type":"string","pattern":"^([a-z0-9-]+\\.)+[a-z]{2,}$"},"owner":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120}},"required":["email"]},"brand":{"type":"object","properties":{"tokens":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"logoUrl":{"type":"string","maxLength":2000},"tagline":{"type":"string","maxLength":200},"notes":{"type":"string","maxLength":1000}}},"publish":{"default":true,"type":"boolean"},"dryRun":{"default":false,"type":"boolean"}},"required":["prompt"]}}}}}},"/sites/{siteId}/pages":{"get":{"operationId":"listPages","tags":["Pages"],"summary":"List pages","description":"Every page and article on the site, the homepage first. Entry page templates of collections are listed only with ?kind=template.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["page","post","template"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]}},"required":["id","slug","kind","title","status","updatedAt"],"additionalProperties":{},"description":"A page without its blocks."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Pages."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"createPage","tags":["Pages"],"summary":"Create a page","description":"Add a page or article from a title, optionally from one of the theme’s templates. It starts as a draft with a free address made from the title (or the slug you give). To write a whole page with its blocks in one call, use PUT /sites/{siteId}/pages/{page} instead.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["page","post"]},"slug":{"type":"string","maxLength":200},"templateId":{"type":"string","maxLength":64}},"required":["title","kind"]}}}}}},"/sites/{siteId}/pages/{page}/blocks":{"get":{"operationId":"listBlocks","tags":["Pages"],"summary":"List a page’s blocks","description":"The blocks of the page’s draft, in order.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}}},"required":["items"],"additionalProperties":false}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Send back as If-Match when you save."}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"addBlock","tags":["Pages"],"summary":"Add a block","description":"Insert a block into the page’s draft: at the end, at a position, or before or after another block. The page is validated as a whole; nothing is published until you publish it.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"The ETag from your last read. The write is refused with 412 if the page changed since."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."},"block":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."},"warnings":{"type":"array","items":{}}},"required":["page","block","warnings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","minLength":1,"maxLength":64,"description":"A block type from GET /sites/{siteId}/blocks."},"props":{"default":{},"description":"Content for the block’s fields. Missing fields take the block’s defaults.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"variant":{"type":"string","maxLength":64},"hidden":{"type":"boolean"},"anchor":{"type":"string","maxLength":64},"id":{"description":"Leave out to get a fresh id.","type":"string","maxLength":64},"position":{"description":"Where to put it, counting from 0. Default: the end.","type":"integer","minimum":0,"maximum":9007199254740991},"after":{"description":"Put it right after the block with this id.","type":"string","maxLength":64},"before":{"description":"Put it right before the block with this id.","type":"string","maxLength":64}},"required":["type"]},"example":{"type":"richText","props":{"body":"<p>Open every day from 8.</p>"},"after":"b_hero"}}}}}},"/sites/{siteId}/pages/{page}/blocks/{blockId}":{"get":{"operationId":"getBlock","tags":["Pages"],"summary":"Get a block","description":"One block of the page’s draft.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"patch":{"operationId":"updateBlock","tags":["Pages"],"summary":"Change a block","description":"Change a block’s props, variant, visibility or anchor in the page’s draft. Props you leave out are kept.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"The ETag from your last read. The write is refused with 412 if the page changed since."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."},"block":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."},"warnings":{"type":"array","items":{}}},"required":["page","block","warnings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"props":{"description":"Props to change. Others are kept. Send null for a prop to remove it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"variant":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"hidden":{"type":"boolean"},"anchor":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}}},"example":{"props":{"heading":"Fresh bread from 7am"}}}}}},"delete":{"operationId":"deleteBlock","tags":["Pages"],"summary":"Remove a block","description":"Remove a block from the page’s draft.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"The ETag from your last read. The write is refused with 412 if the page changed since."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."},"warnings":{"type":"array","items":{}}},"required":["page","warnings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/pages/{page}/blocks/{blockId}/move":{"post":{"operationId":"moveBlock","tags":["Pages"],"summary":"Move a block","description":"Move a block to a position, or before or after another block.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"blockId","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"The ETag from your last read. The write is refused with 412 if the page changed since."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."},"warnings":{"type":"array","items":{}}},"required":["page","warnings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"position":{"description":"Where to put it, counting from 0. Default: the end.","type":"integer","minimum":0,"maximum":9007199254740991},"after":{"description":"Put it right after the block with this id.","type":"string","maxLength":64},"before":{"description":"Put it right before the block with this id.","type":"string","maxLength":64}}}}}}}},"/sites/{siteId}/pages/{page}/publish":{"post":{"operationId":"publishPage","tags":["Pages"],"summary":"Publish a page","description":"Make the page’s draft live. Any waiting site-wide changes (site style, logo, menu and footer, saved through the settings or design endpoints) go live with it; sitePublished lists them when there were some. A revision is kept, so it can be restored later.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":200}}}}}}}},"/sites/{siteId}/pages/{page}/unpublish":{"post":{"operationId":"unpublishPage","tags":["Pages"],"summary":"Unpublish a page","description":"Take the page off the live site. The draft is kept. The homepage can’t be unpublished.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/pages/{page}/duplicate":{"post":{"operationId":"duplicatePage","tags":["Pages"],"summary":"Duplicate a page","description":"Copy the page’s draft to a new draft page at a free address.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/pages/{page}/revisions":{"get":{"operationId":"listRevisions","tags":["Pages"],"summary":"List revisions","description":"The page’s last 50 published versions, newest first.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pageId":{"type":"string"},"note":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"userName":{"type":"string"}},"required":["id","pageId","createdAt"],"additionalProperties":{},"description":"A published version of a page."}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/sites/{siteId}/pages/{page}/revisions/{revisionId}/restore":{"post":{"operationId":"restoreRevision","tags":["Pages"],"summary":"Restore a revision","description":"Put a published version back as the page’s draft. Publish it to make it live again.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/pages/{page}":{"get":{"operationId":"getPage","tags":["Pages"],"summary":"Get a page","description":"A page with all its blocks: the draft, or the live version with ?version=published. The ETag header can be sent back as If-Match when you save.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"version","in":"query","required":false,"schema":{"type":"string","enum":["draft","published"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Send back as If-Match when you save."}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"put":{"operationId":"putPage","tags":["Pages"],"summary":"Create or replace a page","description":"Write a whole page at an address: its title, SEO and every block. Creates the page when nothing is there. The blocks are checked against the theme’s block types; errors name the exact path (pages[0].blocks[2].props.heading). Saved as a draft unless publish is true (which also puts any waiting site-wide changes live). Send If-Match with the ETag you read to avoid overwriting someone else’s change.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."},{"name":"If-Match","in":"header","required":false,"schema":{"type":"string"},"description":"The ETag from your last read. The write is refused with 412 if the page changed since."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The address, like \"/\" or \"/insights/my-post\"."},"kind":{"type":"string","enum":["page","post","template"]},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed"],"description":"changed: live, with draft edits not yet published."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"publishedAt":{"anyOf":[{"type":"string","description":"An ISO 8601 timestamp."},{"type":"null"}]},"siteId":{"type":"string"},"seo":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique within the page."},"type":{"type":"string","description":"A block type from GET /sites/{siteId}/blocks."},"variant":{"type":"string"},"props":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The block’s content, shaped by its fields."},"hidden":{"type":"boolean"},"anchor":{"description":"An id for in-page links, like \"pricing\".","type":"string"}},"required":["id","type","props"],"additionalProperties":{},"description":"One section of a page."}},"post":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","kind","title","status","updatedAt","siteId","seo","blocks","createdAt"],"additionalProperties":{},"description":"A page with its blocks (the draft unless ?version=published)."},"created":{"type":"boolean"},"warnings":{"type":"array","items":{}}},"required":["page","created","warnings"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["page","post"]},"seo":{"description":"title, description, ogImage, canonical, noindex.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"post":{"description":"Articles only: excerpt, author, cover, tags.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"blocks":{"maxItems":250,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"publish":{"default":false,"description":"Publish straight away. Default: save as a draft.","type":"boolean"}},"required":["title","blocks"]},"example":{"title":"About us","blocks":[{"id":"b1","type":"richText","props":{"body":"<p>We bake every morning.</p>"}}],"publish":false}}}}},"delete":{"operationId":"deletePage","tags":["Pages"],"summary":"Delete a page","description":"Delete a page and take it off the live site. The homepage can’t be deleted; replace it with PUT instead.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"page","in":"path","required":true,"schema":{"type":"string"},"description":"A page id (pg_…) or its address: \"index\" for the homepage, \"about\" for /about, \"insights/my-post\" for /insights/my-post."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"The page changed since you read it (If-Match).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/collections":{"get":{"operationId":"listCollections","tags":["Collections"],"summary":"List collections","description":"The site’s collections (menu, rooms, team, events…) with their fields and entry counts.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The handle used in URLs, like \"menu\" or \"dive-sites\"."},"name":{"type":"string"},"singular":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"entryCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A list the site keeps: a menu, rooms, courses, team, events."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Collections."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"createCollection","tags":["Collections"],"summary":"Create a collection","description":"Add a collection, from a preset or with your own fields. Owners and admins only.\n\nScope: `content:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The handle used in URLs, like \"menu\" or \"dive-sites\"."},"name":{"type":"string"},"singular":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"entryCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A list the site keeps: a menu, rooms, courses, team, events."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"singular":{"description":"What one entry is called, like \"Dish\".","type":"string","maxLength":80},"key":{"description":"The handle in URLs. Made from the name when left out.","type":"string","maxLength":60},"preset":{"description":"Start from a preset (menu, team, events, rooms…): its fields and settings.","type":"string","maxLength":60},"fields":{"description":"Fields: { key, label, type, required?, options? }. Types include text, richText, number, price, image, date, select, boolean, url, email and reference.","maxItems":200,"type":"array","items":{}},"settings":{"description":"Sorting, entry pages (basePath), labels.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"example":{"name":"Team","fields":[{"key":"role","label":"Role","type":"text"}]}}}}}},"/sites/{siteId}/collections/{key}":{"get":{"operationId":"getCollection","tags":["Collections"],"summary":"Get a collection","description":"One collection with its fields and settings.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The handle used in URLs, like \"menu\" or \"dive-sites\"."},"name":{"type":"string"},"singular":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"entryCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A list the site keeps: a menu, rooms, courses, team, events."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"put":{"operationId":"updateCollection","tags":["Collections"],"summary":"Change a collection","description":"Change a collection’s name, fields or settings. Owners and admins only.\n\nScope: `content:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"The handle used in URLs, like \"menu\" or \"dive-sites\"."},"name":{"type":"string"},"singular":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"entryCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A list the site keeps: a menu, rooms, courses, team, events."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"singular":{"description":"What one entry is called, like \"Dish\".","type":"string","maxLength":80},"key":{"description":"The handle in URLs. Made from the name when left out.","type":"string","maxLength":60},"fields":{"description":"Fields: { key, label, type, required?, options? }. Types include text, richText, number, price, image, date, select, boolean, url, email and reference.","maxItems":200,"type":"array","items":{}},"settings":{"description":"Sorting, entry pages (basePath), labels.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}},"delete":{"operationId":"deleteCollection","tags":["Collections"],"summary":"Delete a collection","description":"Delete a collection and all its entries. Owners and admins only.\n\nScope: `content:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","x-unvop-role":"owner or admin"}},"/sites/{siteId}/collections/{key}/entries":{"get":{"operationId":"listEntries","tags":["Collections"],"summary":"List entries","description":"A collection’s entries in their order. Filter by status or search with q.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"How many to return (default 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","published"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search the slug and values."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991},"description":"Kept for older clients; prefer cursor."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values keyed by field key."},"position":{"type":"number"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","status","data","createdAt","updatedAt"],"additionalProperties":{},"description":"One item in a collection."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Entries."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"createEntry","tags":["Collections"],"summary":"Add an entry","description":"Add an entry. Values are checked against the collection’s fields; errors come back in details.fields keyed data.<field>. Workflows listening for new entries run.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values keyed by field key."},"position":{"type":"number"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","status","data","createdAt","updatedAt"],"additionalProperties":{},"description":"One item in a collection."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"description":"Made from the title when left out.","type":"string","maxLength":200},"data":{"description":"Values keyed by field key.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"description":"Published entries go live at once.","type":"string","enum":["draft","published"]}}},"example":{"data":{"title":"Ana","role":"Guide"},"status":"published"}}}}}},"/sites/{siteId}/collections/{key}/entries/{slug}":{"get":{"operationId":"getEntry","tags":["Collections"],"summary":"Get an entry","description":"One entry, by its slug (or id).\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values keyed by field key."},"position":{"type":"number"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","status","data","createdAt","updatedAt"],"additionalProperties":{},"description":"One item in a collection."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"put":{"operationId":"updateEntry","tags":["Collections"],"summary":"Change an entry","description":"Change an entry’s values, slug or status. Values you send replace the stored ones for those fields.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Values keyed by field key."},"position":{"type":"number"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","slug","status","data","createdAt","updatedAt"],"additionalProperties":{},"description":"One item in a collection."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"description":"Made from the title when left out.","type":"string","maxLength":200},"data":{"description":"Values keyed by field key.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"description":"Published entries go live at once.","type":"string","enum":["draft","published"]}}}}}}},"delete":{"operationId":"deleteEntry","tags":["Collections"],"summary":"Delete an entry","description":"Delete an entry. It leaves the live site at once.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"It conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/collections/{key}/source":{"get":{"operationId":"getSource","tags":["Collections"],"summary":"Get a collection’s source","description":"Where the entries come from: typed in (manual), synced from a connection every 15 minutes (sync), or fetched while the page renders (live). Also whether the collection is published at /api/data/{key}.\n\nScope: `connections:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","sync","live"]},"connectionId":{"type":["string","null"]}},"required":["mode"],"additionalProperties":{}},"api":{"type":"object","properties":{"enabled":{"type":"boolean"},"access":{"type":"string","enum":["public","key"]}},"required":["enabled","access"],"additionalProperties":{}}},"required":["source","api"],"additionalProperties":{},"description":"Where a collection’s entries come from, and whether it is published at /api/data/{key}."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:read"},"put":{"operationId":"putSource","tags":["Collections"],"summary":"Change a collection’s source","description":"Point a collection at a connection (sync or live), map the answer’s fields to the collection’s, or set it back to manual. A collection that starts syncing is pulled at once. Also turns its public data API on or off. Owners and admins only.\n\nScope: `connections:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","sync","live"]},"connectionId":{"type":["string","null"]}},"required":["mode"],"additionalProperties":{}},"api":{"type":"object","properties":{"enabled":{"type":"boolean"},"access":{"type":"string","enum":["public","key"]}},"required":["enabled","access"],"additionalProperties":{}}},"required":["source","api"],"additionalProperties":{},"description":"Where a collection’s entries come from, and whether it is published at /api/data/{key}."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","sync","live"]},"connectionId":{"type":["string","null"]},"path":{"description":"Added to the connection’s base URL.","type":"string"},"itemsPath":{"description":"Where the list is in the answer, as a dot path (\"\" for the top level).","type":"string"},"mapping":{"description":"Field key to a dot path in each item.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"idPath":{"type":"string"},"everyMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ttlMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"api":{"type":"object","properties":{"enabled":{"type":"boolean"},"access":{"type":"string","enum":["public","key"]}}}}}}}}}},"/sites/{siteId}/collections/{key}/source/preview":{"post":{"operationId":"previewSource","tags":["Collections"],"summary":"Preview a source","description":"Ask a connection for data at a path and see the lists in the answer, the first item’s values and a suggested field mapping, without saving anything.\n\nScope: `connections:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"probe":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"number"},"sample":{},"error":{"type":"string"}},"required":["ok"],"additionalProperties":{},"description":"What a connection answered."},"candidates":{"type":"array","items":{}},"itemsPath":{"type":["string","null"]},"count":{"type":"number"},"mapping":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["probe","candidates","itemsPath","count","mapping"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"connectionId":{"type":"string"},"path":{"type":"string"},"itemsPath":{"type":"string"}},"required":["connectionId"]}}}}}},"/sites/{siteId}/collections/{key}/source/sync":{"post":{"operationId":"syncSource","tags":["Collections"],"summary":"Sync now","description":"Pull a synced collection from its connection now instead of waiting for the next 15-minute sync.\n\nScope: `connections:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"mode":{"type":"string","enum":["manual","sync","live"]},"connectionId":{"type":["string","null"]}},"required":["mode"],"additionalProperties":{}},"api":{"type":"object","properties":{"enabled":{"type":"boolean"},"access":{"type":"string","enum":["public","key"]}},"required":["enabled","access"],"additionalProperties":{}},"sync":{}},"required":["source","api","sync"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","x-unvop-role":"owner or admin"}},"/sites/{siteId}/media":{"get":{"operationId":"listMedia","tags":["Media"],"summary":"List media","description":"Uploaded images, videos and files, newest first (up to 500). Search with q; filter with type.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["image","video","other"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"A site-relative address, like /media/<key>."},"filename":{"type":"string"},"mime":{"type":"string"},"size":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","url","filename","mime","size","alt","createdAt"],"additionalProperties":{},"description":"An uploaded image, video or file."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Media."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"uploadMedia","tags":["Media"],"summary":"Upload media","description":"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.\n\nScope: `media:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"A site-relative address, like /media/<key>."},"filename":{"type":"string"},"mime":{"type":"string"},"size":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"absoluteUrl":{"type":"string"}},"required":["id","url","filename","mime","size","alt","createdAt","absoluteUrl"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"That file type isn’t supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"media:write","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"alt":{"type":"string"}},"required":["file"]}},"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"alt":{"type":"string","maxLength":500},"filename":{"type":"string","maxLength":200}},"required":["url"]}}}}}},"/sites/{siteId}/media/{mediaId}":{"patch":{"operationId":"updateMedia","tags":["Media"],"summary":"Describe media","description":"Change a file’s alt text, which screen readers and search engines read.\n\nScope: `media:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"mediaId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"A site-relative address, like /media/<key>."},"filename":{"type":"string"},"mime":{"type":"string"},"size":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"alt":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","url","filename","mime","size","alt","createdAt"],"additionalProperties":{},"description":"An uploaded image, video or file."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"media:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"alt":{"type":"string","maxLength":500}},"required":["alt"]}}}}},"delete":{"operationId":"deleteMedia","tags":["Media"],"summary":"Delete media","description":"Delete a file. Pages that still use it show nothing in its place.\n\nScope: `media:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"mediaId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"media:write"}},"/sites/{siteId}/forms":{"get":{"operationId":"listForms","tags":["Forms"],"summary":"List forms","description":"The site’s forms with their fields, settings and submission counts.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"submissionCount":{"type":"number"}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A form on the site."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Forms."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"post":{"operationId":"createForm","tags":["Forms"],"summary":"Create a form","description":"Add a form. Show it on a page with a form block that names its key.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"submissionCount":{"type":"number"}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A form on the site."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"description":"The handle blocks use to show the form. Made from the name when left out.","type":"string","maxLength":60},"name":{"type":"string","minLength":1,"maxLength":120},"fields":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Letters, numbers, - and _."},"label":{"type":"string"},"type":{"type":"string","enum":["text","email","tel","url","textarea","select","radio","checkbox","checkboxes","hidden"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"mapsTo":{"description":"Which contact detail the answer fills in.","type":"string","enum":["email","name","company","phone"]},"width":{"type":"string","enum":["full","half"]}},"required":["name","label","type"]}},"settings":{"type":"object","properties":{"submitLabel":{"type":"string"},"successTitle":{"type":"string"},"successMessage":{"type":"string"},"redirect":{"type":"string"},"notify":{"description":"Email addresses told about each submission.","type":"array","items":{"type":"string"}},"autoresponder":{"type":"object","properties":{"enabled":{"type":"boolean"},"subject":{"type":"string"},"body":{"type":"string"}},"required":["enabled","subject","body"]}},"additionalProperties":{},"description":"What happens after someone sends it."}},"required":["name","fields","settings"]}}}}}},"/sites/{siteId}/forms/{formId}":{"get":{"operationId":"getForm","tags":["Forms"],"summary":"Get a form","description":"One form.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"formId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"submissionCount":{"type":"number"}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A form on the site."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"put":{"operationId":"updateForm","tags":["Forms"],"summary":"Replace a form","description":"Replace a form’s name, fields and settings. Its key stays the same.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"formId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"fields":{"type":"array","items":{}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"submissionCount":{"type":"number"}},"required":["id","key","name","fields","settings"],"additionalProperties":{},"description":"A form on the site."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"description":"The handle blocks use to show the form. Made from the name when left out.","type":"string","maxLength":60},"name":{"type":"string","minLength":1,"maxLength":120},"fields":{"maxItems":40,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Letters, numbers, - and _."},"label":{"type":"string"},"type":{"type":"string","enum":["text","email","tel","url","textarea","select","radio","checkbox","checkboxes","hidden"]},"required":{"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"options":{"type":"array","items":{"type":"string"}},"mapsTo":{"description":"Which contact detail the answer fills in.","type":"string","enum":["email","name","company","phone"]},"width":{"type":"string","enum":["full","half"]}},"required":["name","label","type"]}},"settings":{"type":"object","properties":{"submitLabel":{"type":"string"},"successTitle":{"type":"string"},"successMessage":{"type":"string"},"redirect":{"type":"string"},"notify":{"description":"Email addresses told about each submission.","type":"array","items":{"type":"string"}},"autoresponder":{"type":"object","properties":{"enabled":{"type":"boolean"},"subject":{"type":"string"},"body":{"type":"string"}},"required":["enabled","subject","body"]}},"additionalProperties":{},"description":"What happens after someone sends it."}},"required":["name","fields","settings"]}}}}},"delete":{"operationId":"deleteForm","tags":["Forms"],"summary":"Delete a form","description":"Delete a form and its submissions.\n\nScope: `content:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"formId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:write"}},"/sites/{siteId}/submissions":{"get":{"operationId":"listSubmissions","tags":["Forms"],"summary":"List submissions","description":"Sent forms, newest first. Filter by form with formId.\n\nScope: `contacts:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"How many to return (default 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous page."},{"name":"formId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"formId":{"type":"string"},"formName":{"type":"string"},"contactId":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","formId","data","createdAt"],"additionalProperties":{},"description":"One sent form."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Submissions."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:read"}},"/sites/{siteId}/submissions/{submissionId}":{"delete":{"operationId":"deleteSubmission","tags":["Forms"],"summary":"Delete a submission","description":"Delete one sent form. The contact it created stays.\n\nScope: `contacts:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"submissionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:write"}},"/sites/{siteId}/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"Contacts, most recently active first. Search name, email and company with q; filter by stage or tag.\n\nScope: `contacts:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200},"description":"How many to return (default 50)."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The cursor from the previous page."},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"stage","in":"query","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"stage":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"score":{"type":"number"},"source":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastActivityAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","email","stage","tags","score","data","createdAt","updatedAt"],"additionalProperties":{},"description":"A person in the CRM."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Contacts."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:read"},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Add a contact","description":"Add a person to the CRM. The email must be new to this site.\n\nScope: `contacts:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"stage":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"score":{"type":"number"},"source":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastActivityAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","email","stage","tags","score","data","createdAt","updatedAt"],"additionalProperties":{},"description":"A person in the CRM."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":60},"stage":{"description":"A pipeline stage id from GET /sites/{siteId}/pipeline.","type":"string","maxLength":40},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":40}},"score":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","maxLength":100},"data":{"description":"Extra details. Merged into what is stored.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["email"]}}}}}},"/sites/{siteId}/contacts/{contactId}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Get a contact","description":"A contact with their activity, form submissions and payments.\n\nScope: `contacts:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"contact":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"stage":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"score":{"type":"number"},"source":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastActivityAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","email","stage","tags","score","data","createdAt","updatedAt"],"additionalProperties":{},"description":"A person in the CRM."},"activities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contactId":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","contactId","type","summary","createdAt"],"additionalProperties":{},"description":"Something that happened with a contact."}},"submissions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"formId":{"type":"string"},"formName":{"type":"string"},"contactId":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","formId","data","createdAt"],"additionalProperties":{},"description":"One sent form."}},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"In minor units (cents)."},"currency":{"type":"string"},"status":{"type":"string"},"mode":{"type":"string","enum":["payment","subscription"]},"contactEmail":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","amount","currency","status","mode","createdAt"],"additionalProperties":{},"description":"A payment taken through Stripe."}}},"required":["contact","activities","submissions","payments"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:read"},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Change a contact","description":"Change a contact’s details, stage, tags or score. Moving stage is logged in their activity.\n\nScope: `contacts:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"stage":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"score":{"type":"number"},"source":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastActivityAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","email","stage","tags","score","data","createdAt","updatedAt"],"additionalProperties":{},"description":"A person in the CRM."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":60},"stage":{"description":"A pipeline stage id from GET /sites/{siteId}/pipeline.","type":"string","maxLength":40},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":40}},"score":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","maxLength":100},"data":{"description":"Extra details. Merged into what is stored.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete a contact","description":"Delete a contact and their activity.\n\nScope: `contacts:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:write"}},"/sites/{siteId}/contacts/{contactId}/notes":{"post":{"operationId":"addContactNote","tags":["Contacts"],"summary":"Add a note","description":"Add a note to a contact’s activity.\n\nScope: `contacts:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"contactId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"contactId":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","contactId","type","summary","createdAt"],"additionalProperties":{},"description":"Something that happened with a contact."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["text"]}}}}}},"/sites/{siteId}/pipeline":{"get":{"operationId":"getPipeline","tags":["Contacts"],"summary":"Get the pipeline","description":"The site’s pipeline stages (New lead, Qualified, Call booked…) and its contacts (up to 1000) to place in them.\n\nScope: `contacts:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"stages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"contacts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"company":{"type":"string"},"phone":{"type":"string"},"stage":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"score":{"type":"number"},"source":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."},"updatedAt":{"type":"string","description":"An ISO 8601 timestamp."},"lastActivityAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","email","stage","tags","score","data","createdAt","updatedAt"],"additionalProperties":{},"description":"A person in the CRM."}}},"required":["stages","contacts"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:read"}},"/sites/{siteId}/activity":{"get":{"operationId":"listActivity","tags":["Contacts"],"summary":"Recent activity","description":"What happened across the CRM, newest first: form submissions, notes, emails, stage moves, payments.\n\nScope: `contacts:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"contactId":{"type":"string"},"type":{"type":"string"},"summary":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","contactId","type","summary","createdAt"],"additionalProperties":{},"description":"Something that happened with a contact."}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"contacts:read"}},"/sites/{siteId}/payments":{"get":{"operationId":"listPayments","tags":["Payments"],"summary":"List payments","description":"Payments and subscriptions taken through Stripe on the site, newest first (up to 500). Amounts are in minor units (cents).\n\nScope: `payments:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"In minor units (cents)."},"currency":{"type":"string"},"status":{"type":"string"},"mode":{"type":"string","enum":["payment","subscription"]},"contactEmail":{"type":"string"},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","amount","currency","status","mode","createdAt"],"additionalProperties":{},"description":"A payment taken through Stripe."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Payments."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"payments:read"}},"/workflow-nodes":{"get":{"operationId":"listWorkflowNodes","tags":["Workflows"],"summary":"List workflow nodes","description":"Every node a workflow can use: triggers (a form is sent, an entry changes, a schedule, a webhook, a payment…) and steps (conditions, contacts, emails, collection writes, AI sort, summarise and draft, HTTP requests, responses). Each lists its config fields and what it outputs, so you can write a valid graph.\n\nScope: `workflows:read`.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"fields":{"type":"array","items":{}}},"required":["type","label","category"],"additionalProperties":{},"description":"A node a workflow can use."}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"}},"/sites/{siteId}/workflow-templates":{"get":{"operationId":"listWorkflowTemplates","tags":["Workflows"],"summary":"List workflow templates","description":"Ready-made workflows to start from (welcome new leads, notify on payment…). Pass a template id to POST /sites/{siteId}/workflows.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"graph":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."}},"required":["id","name","description","graph"],"additionalProperties":{}}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"}},"/sites/{siteId}/workflows":{"get":{"operationId":"listWorkflows","tags":["Workflows"],"summary":"List workflows","description":"The site’s workflows, with their draft and published graphs and whether they are on.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Runs when its trigger fires. Only a published workflow can be on."},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},"live":{"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},{"type":"null"}],"description":"The published graph that runs."},"hook":{"description":"For webhook workflows: the address it answers at."}},"required":["id","name","description","enabled","draft","live"],"additionalProperties":{},"description":"A workflow."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Workflows."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"},"post":{"operationId":"createWorkflow","tags":["Workflows"],"summary":"Create a workflow","description":"Create a workflow from a template or your own graph. It starts as a draft: test it, publish it, then turn it on with PATCH { enabled: true }.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Runs when its trigger fires. Only a published workflow can be on."},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},"live":{"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},{"type":"null"}],"description":"The published graph that runs."},"hook":{"description":"For webhook workflows: the address it answers at."}},"required":["id","name","description","enabled","draft","live"],"additionalProperties":{},"description":"A workflow."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":500},"templateId":{"type":"string"},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type"]}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"]}}},"required":["nodes","edges"],"description":"A workflow graph: one trigger node and the steps it leads to."}}},"example":{"name":"Tag new leads","draft":{"nodes":[{"id":"trigger","type":"trigger.form","config":{"form":"contact"}},{"id":"tag","type":"people.upsert","config":{"email":"{{trigger.contact.email}}","tags":"website"}}],"edges":[{"from":"trigger","port":"next","to":"tag"}]}}}}}}},"/sites/{siteId}/workflows/{workflowId}":{"get":{"operationId":"getWorkflow","tags":["Workflows"],"summary":"Get a workflow","description":"One workflow with its draft and published graphs.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Runs when its trigger fires. Only a published workflow can be on."},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},"live":{"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},{"type":"null"}],"description":"The published graph that runs."},"hook":{"description":"For webhook workflows: the address it answers at."}},"required":["id","name","description","enabled","draft","live"],"additionalProperties":{},"description":"A workflow."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"},"patch":{"operationId":"updateWorkflow","tags":["Workflows"],"summary":"Change a workflow","description":"Rename it, replace its draft graph, or turn it on or off (enabled). Only a published workflow can be turned on, and only owners and admins can turn workflows on or off.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Runs when its trigger fires. Only a published workflow can be on."},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},"live":{"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},{"type":"null"}],"description":"The published graph that runs."},"hook":{"description":"For webhook workflows: the address it answers at."}},"required":["id","name","description","enabled","draft","live"],"additionalProperties":{},"description":"A workflow."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":500},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type"]}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"]}}},"required":["nodes","edges"],"description":"A workflow graph: one trigger node and the steps it leads to."},"enabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteWorkflow","tags":["Workflows"],"summary":"Delete a workflow","description":"Delete a workflow and its runs. Owners and admins only.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write"}},"/sites/{siteId}/workflows/{workflowId}/publish":{"post":{"operationId":"publishWorkflow","tags":["Workflows"],"summary":"Publish a workflow","description":"Make the draft graph the one that runs. Problems that would stop it running come back as details.problems. A webhook workflow’s first publish returns hookSecret, its signing secret, once. Owners and admins only.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"enabled":{"type":"boolean","description":"Runs when its trigger fires. Only a published workflow can be on."},"draft":{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},"live":{"anyOf":[{"type":"object","properties":{"nodes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":40},"type":{"type":"string","maxLength":40,"description":"A node type from GET /workflow-nodes, like trigger.form or people.upsert."},"label":{"type":"string","maxLength":120},"config":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"x":{"default":0,"type":"number"},"y":{"default":0,"type":"number"}},"required":["id","type","config","x","y"],"additionalProperties":false}},"edges":{"maxItems":300,"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"port":{"type":"string","description":"The output port: \"next\", or \"true\"/\"false\" after logic.if, or \"pass\" after logic.filter."},"to":{"type":"string"}},"required":["from","port","to"],"additionalProperties":false}}},"required":["nodes","edges"],"additionalProperties":false,"description":"A workflow graph: one trigger node and the steps it leads to."},{"type":"null"}],"description":"The published graph that runs."},"hook":{"description":"For webhook workflows: the address it answers at."},"hookSecret":{"type":"string"}},"required":["id","name","description","enabled","draft","live"],"additionalProperties":{}}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write"}},"/sites/{siteId}/workflows/{workflowId}/test":{"post":{"operationId":"testWorkflow","tags":["Workflows"],"summary":"Test a workflow","description":"Run the draft graph once as a test, with the trigger payload you send or the trigger’s sample. Follow the run with GET /sites/{siteId}/runs/{runId}.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trigger":{"description":"The payload the trigger would carry."}}}}}}}},"/sites/{siteId}/workflows/{workflowId}/run":{"post":{"operationId":"runWorkflow","tags":["Workflows"],"summary":"Run a workflow","description":"Run the published graph now with the input you send, as its Run button does. Follow the run with GET /sites/{siteId}/runs/{runId}.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"}},"required":["runId"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}}},"/sites/{siteId}/workflows/{workflowId}/hook-secret":{"post":{"operationId":"rotateHookSecret","tags":["Workflows"],"summary":"Rotate a webhook secret","description":"Make a new signing secret for a published webhook workflow. The old one stops working. Shown once. Owners and admins only.\n\nScope: `workflows:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:write"}},"/sites/{siteId}/workflows/{workflowId}/runs":{"get":{"operationId":"listWorkflowRuns","tags":["Workflows"],"summary":"List a workflow’s runs","description":"The workflow’s recent runs, newest first.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflowId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workflowId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"source":{"type":"string"},"steps":{"type":"array","items":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","workflowId","status","createdAt"],"additionalProperties":{},"description":"One run of a workflow, with its steps."}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"}},"/sites/{siteId}/runs":{"get":{"operationId":"listRuns","tags":["Workflows"],"summary":"List runs","description":"Recent runs of every workflow on the site, newest first. Filter by workflow or status.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"workflow","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"workflowId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"source":{"type":"string"},"steps":{"type":"array","items":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","workflowId","status","createdAt"],"additionalProperties":{},"description":"One run of a workflow, with its steps."}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"}},"/sites/{siteId}/runs/{runId}":{"get":{"operationId":"getRun","tags":["Workflows"],"summary":"Get a run","description":"One run with each step: what went in, what came out, and any error.\n\nScope: `workflows:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"runId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"workflowId":{"type":"string"},"status":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"source":{"type":"string"},"steps":{"type":"array","items":{}},"createdAt":{"type":"string","description":"An ISO 8601 timestamp."}},"required":["id","workflowId","status","createdAt"],"additionalProperties":{},"description":"One run of a workflow, with its steps."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"workflows:read"}},"/sites/{siteId}/tool-templates":{"get":{"operationId":"listToolTemplates","tags":["Tools"],"summary":"List tool templates","description":"Ready-made tools (a bookings board, an orders table…) to start from.\n\nScope: `tools:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:read"}},"/sites/{siteId}/tools":{"get":{"operationId":"listTools","tags":["Tools"],"summary":"List tools","description":"The tools you may open: small internal apps (tables, forms, charts) over the site’s collections, contacts and connections.\n\nScope: `tools:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"access":{"type":"string","enum":["owner","admin","editor"]},"spec":{}},"required":["id","name","spec"],"additionalProperties":{},"description":"A tool: a small internal app over the site’s data."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Tools."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:read"},"post":{"operationId":"createTool","tags":["Tools"],"summary":"Create a tool","description":"Create a tool, blank or from a template (picks fill the template’s choices, such as which collection it shows). Owners and admins only.\n\nScope: `tools:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"access":{"type":"string","enum":["owner","admin","editor"]},"spec":{}},"required":["id","name","spec"],"additionalProperties":{},"description":"A tool: a small internal app over the site’s data."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"templateId":{"type":"string"},"picks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"description":{"type":"string","maxLength":280},"icon":{"type":"string","maxLength":40}}}}}}}},"/sites/{siteId}/tools/{toolId}":{"get":{"operationId":"getTool","tags":["Tools"],"summary":"Get a tool","description":"One tool with its spec: components, queries and layout.\n\nScope: `tools:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"access":{"type":"string","enum":["owner","admin","editor"]},"spec":{}},"required":["id","name","spec"],"additionalProperties":{},"description":"A tool: a small internal app over the site’s data."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:read"},"patch":{"operationId":"updateTool","tags":["Tools"],"summary":"Change a tool","description":"Change a tool’s name, icon, description, spec, who may use it (access) or whether it is pinned. Owners and admins only.\n\nScope: `tools:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"access":{"type":"string","enum":["owner","admin","editor"]},"spec":{}},"required":["id","name","spec"],"additionalProperties":{},"description":"A tool: a small internal app over the site’s data."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"icon":{"type":"string","maxLength":40},"description":{"type":"string","maxLength":280},"spec":{},"access":{"type":"string","enum":["owner","admin","editor"]},"pinned":{"type":"boolean"}}}}}}},"delete":{"operationId":"deleteTool","tags":["Tools"],"summary":"Delete a tool","description":"Delete a tool. Its data stays where it is. Owners and admins only.\n\nScope: `tools:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:write"}},"/sites/{siteId}/tools/{toolId}/queries/{queryId}/run":{"post":{"operationId":"runToolQuery","tags":["Tools"],"summary":"Run a tool query","description":"Run one of a tool’s queries with the component values it reads (scope), and get its rows or result.\n\nScope: `tools:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"toolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"queryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{}}},"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"tools:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"description":"Component state the query reads, like a filter’s value.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}}},"/sites/{siteId}/connections":{"get":{"operationId":"listConnections","tags":["Connections"],"summary":"List connections","description":"Connections to outside APIs, Google Sheets, Airtable and feeds, with how many collections use each and the last test. Secret values are never returned; secretsSet names the ones that are set.\n\nScope: `connections:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretsSet":{"type":"array","items":{"type":"string"},"description":"The names of secrets that have a value. Secret values are never returned."}},"required":["id","name","kind","baseUrl","headers","secretsSet"],"additionalProperties":{},"description":"A connection to an outside API, sheet or feed."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Connections."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:read"},"post":{"operationId":"createConnection","tags":["Connections"],"summary":"Create a connection","description":"Connect an outside API, sheet or feed. Secrets are stored encrypted and are write-only. Owners and admins only.\n\nScope: `connections:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200},"description":"Send the same key to repeat this request safely; the first answer is replayed for 24 hours."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretsSet":{"type":"array","items":{"type":"string"},"description":"The names of secrets that have a value. Secret values are never returned."}},"required":["id","name","kind","baseUrl","headers","secretsSet"],"additionalProperties":{},"description":"A connection to an outside API, sheet or feed."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string","maxLength":2000},"headers":{"description":"Plain headers sent with every request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secrets":{"description":"Secret headers (or apiKey), encrypted at rest and never returned. Send an empty string to remove one; leave one out to keep it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["name","kind","baseUrl"]},"example":{"name":"Bookings API","kind":"rest","baseUrl":"https://api.example.com/v2","secrets":{"Authorization":"Bearer sk_live_…"}}}}}}},"/sites/{siteId}/connections/{connectionId}":{"get":{"operationId":"getConnection","tags":["Connections"],"summary":"Get a connection","description":"One connection, with the collections that use it and its last test. Secret values are never returned.\n\nScope: `connections:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretsSet":{"type":"array","items":{"type":"string"},"description":"The names of secrets that have a value. Secret values are never returned."}},"required":["id","name","kind","baseUrl","headers","secretsSet"],"additionalProperties":{},"description":"A connection to an outside API, sheet or feed."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:read"},"patch":{"operationId":"updateConnection","tags":["Connections"],"summary":"Change a connection","description":"Change a connection. Secrets you send replace those names; secrets you leave out are kept. Owners and admins only.\n\nScope: `connections:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secretsSet":{"type":"array","items":{"type":"string"},"description":"The names of secrets that have a value. Secret values are never returned."}},"required":["id","name","kind","baseUrl","headers","secretsSet"],"additionalProperties":{},"description":"A connection to an outside API, sheet or feed."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"kind":{"type":"string","enum":["rest","google-sheet","airtable","rss"]},"baseUrl":{"type":"string","maxLength":2000},"headers":{"description":"Plain headers sent with every request.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"secrets":{"description":"Secret headers (or apiKey), encrypted at rest and never returned. Send an empty string to remove one; leave one out to keep it.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}}}}}},"delete":{"operationId":"deleteConnection","tags":["Connections"],"summary":"Delete a connection","description":"Delete a connection. Collections that synced from it keep their entries and become manual. Owners and admins only.\n\nScope: `connections:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write"}},"/sites/{siteId}/connections/{connectionId}/test":{"post":{"operationId":"testConnection","tags":["Connections"],"summary":"Test a connection","description":"Call the connection’s base URL and report what came back. The result is kept as its last test.\n\nScope: `connections:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"number"},"sample":{},"error":{"type":"string"}},"required":["ok"],"additionalProperties":{},"description":"What a connection answered."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write"}},"/sites/{siteId}/connections/{connectionId}/request":{"post":{"operationId":"requestConnection","tags":["Connections"],"summary":"Call a connection","description":"Send one request through a connection (its base URL plus path, with its headers and secrets) and see a sample of the answer. Private and local addresses are refused.\n\nScope: `connections:write`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"number"},"sample":{},"error":{"type":"string"}},"required":["ok"],"additionalProperties":{},"description":"What a connection answered."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"connections:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","maxLength":1000},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","HEAD"]},"body":{}}}}}}}},"/sites/{siteId}/plugins":{"get":{"operationId":"listPlugins","tags":["Plugins"],"summary":"List plugins","description":"Every plugin (email, Stripe, SEO, analytics, booking, spam protection, reviews…) with its settings fields and its state on the site. Secret values are never returned.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"settings":{"type":"array","items":{},"description":"The plugin’s settings fields. Fields with secret: true are write-only."},"state":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secretsSet":{"type":"array","items":{"type":"string"}}},"required":["id","enabled","config","secretsSet"],"additionalProperties":false}},"required":["id","name","description","category","settings","state"],"additionalProperties":{},"description":"A plugin and its state on the site. Secret values are never returned; secretsSet lists which are set."}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Plugins."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"}},"/sites/{siteId}/plugins/{pluginId}":{"get":{"operationId":"getPlugin","tags":["Plugins"],"summary":"Get a plugin","description":"One plugin with its settings fields and state.\n\nScope: `content:read`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"pluginId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"settings":{"type":"array","items":{},"description":"The plugin’s settings fields. Fields with secret: true are write-only."},"state":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secretsSet":{"type":"array","items":{"type":"string"}}},"required":["id","enabled","config","secretsSet"],"additionalProperties":false}},"required":["id","name","description","category","settings","state"],"additionalProperties":{},"description":"A plugin and its state on the site. Secret values are never returned; secretsSet lists which are set."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read"},"put":{"operationId":"configurePlugin","tags":["Plugins"],"summary":"Turn on or configure a plugin","description":"Turn a plugin on or off and change its settings. Secret fields (API keys, tokens) go in secrets: they are encrypted, write-only and never returned. Core plugins can’t be turned off. Owners and admins only.\n\nScope: `settings:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"pluginId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"enabled":{"type":"boolean"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secretsSet":{"type":"array","items":{"type":"string"}}},"required":["id","enabled","config","secretsSet"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"settings:write","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"secrets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"example":{"enabled":true,"config":{"fromEmail":"hello@example.com"}}}}}}},"/sites/{siteId}/plugins/{pluginId}/test":{"post":{"operationId":"testPlugin","tags":["Plugins"],"summary":"Test a plugin","description":"Check a plugin’s connection (for example, send a test email). Owners and admins only.\n\nScope: `settings:write`, as a site owner or admin.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"pluginId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"settings:write","x-unvop-role":"owner or admin"}},"/sites/{siteId}/components":{"get":{"operationId":"listComponents","tags":["Components"],"summary":"List section types and React components","description":"The 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.\n\nScope: `content:read`. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["section","react"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","kind","key","type","name","description","liveVersion"],"additionalProperties":{}}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Components."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read","x-unvop-feature":"components.prompt"},"post":{"operationId":"createComponent","tags":["Components"],"summary":"Create a section type by hand","description":"A 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.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["component"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.prompt","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"description":{"type":"string","maxLength":300},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"fields":{"type":"array","items":{}}},"required":["name","label","type"],"additionalProperties":{},"description":"A field: text, textarea, rich, image, link or list (React also number, toggle, select)."}},"template":{"type":"string"},"css":{"type":"string"},"sample":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name","fields","template"]}}}}}},"/sites/{siteId}/components/generate":{"post":{"operationId":"createComponentFromPrompt","tags":["Components"],"summary":"Create a section type from a prompt","description":"Describe 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.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["component"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.prompt","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":3,"maxLength":2000},"kind":{"type":"string","enum":["section","react"]}},"required":["prompt"]}}}}}},"/sites/{siteId}/components/{component}":{"get":{"operationId":"getComponent","tags":["Components"],"summary":"Get a component","description":"A section type or React component by id or key, with its working copy, versions (and reviews) and the pages that use it.\n\nScope: `content:read`. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read","x-unvop-feature":"components.prompt"},"patch":{"operationId":"updateComponent","tags":["Components"],"summary":"Change a component","description":"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.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"component":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}},"warnings":{"type":"array","items":{"type":"string"}}},"required":["component"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.prompt","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","maxLength":2000}},"additionalProperties":{}}}}}},"delete":{"operationId":"deleteComponent","tags":["Components"],"summary":"Delete a component","description":"Deletes the component and its versions. Sections of this type disappear from the pages that use them.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.prompt","x-unvop-role":"owner or admin"}},"/sites/{siteId}/components/{component}/versions":{"get":{"operationId":"listComponentVersions","tags":["Components"],"summary":"List a component’s versions","description":"Every 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.\n\nScope: `content:read`. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}},"cursor":{"description":"Pass as ?cursor= to get the next page. Null when there are no more.","type":["string","null"]},"total":{"description":"How many there are in all, when the list knows.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items"],"additionalProperties":false,"description":"Versions."}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"content:read","x-unvop-feature":"components.prompt"}},"/sites/{siteId}/components/{component}/submit":{"post":{"operationId":"submitComponent","tags":["Components"],"summary":"Send a React component for review","description":"Compiles 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.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.react`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.react","x-unvop-role":"owner or admin"}},"/sites/{siteId}/components/{component}/publish":{"post":{"operationId":"publishComponent","tags":["Components"],"summary":"Publish a version","description":"Makes `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.\n\nScope: `design:write`, as a site owner or admin. Plan feature: `components.prompt`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"component","in":"path","required":true,"schema":{"type":"string"},"description":"The component id or key."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["section","react"]},"key":{"type":"string"},"type":{"type":"string","description":"The block type to use in page content: x-<key> for a section type, r-<key> for a React component."},"name":{"type":"string"},"description":{"type":["string","null"]},"liveVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"draft":{"description":"The working copy: section {fields, template, css, sample}; React {source, fields, sample, interactive, origins}."},"usedOn":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"}},"required":["id","title","slug"],"additionalProperties":{}}},"versions":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","approved","rejected"]},"prompt":{"type":["string","null"]},"review":{"anyOf":[{},{"type":"null"}],"description":"React: the static findings and the AI review."},"approvedBy":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"createdAt":{"type":"string"}},"required":["version","status","prompt","review","approvedBy","approvedAt","createdAt"],"additionalProperties":{}}}},"required":["id","kind","key","type","name","description","liveVersion","draft","usedOn","versions"],"additionalProperties":{}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"design:write","x-unvop-feature":"components.prompt","x-unvop-role":"owner or admin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["version"]}}}}}},"/sites/{siteId}/analytics/summary":{"get":{"operationId":"getAnalyticsSummary","tags":["Analytics"],"summary":"How the site is doing","description":"The headline numbers for a period, each against the period before: visitors (daily visitors, summed) and sessions counted without cookies, bounce rate and average session length, page views, leads (form submissions), new contacts, conversion rate, payments and revenue, Google search clicks when Search Console is connected, and workflow runs. Plus `highlights`, plain sentences about what changed most, and the top pages, entry pages, lead pages, sources (with the leads each brought) and search queries. Start here for questions like \"how is my site doing this month?\" (period=this_month) and drill in with the other Analytics endpoints.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"metrics":{"type":"object","properties":{"visitors":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Daily visitors, summed: unique visitors per UTC day, counted without cookies, added up over the period. One person who comes on three days counts three times."},"sessions":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Visits: a session ends after 30 minutes without activity."},"bounceRate":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"The share of sessions that saw one page (0.42 is 42%)."},"avgSessionSeconds":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Average session length in seconds, from the first view to leaving the last page."},"viewsPerSession":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"returningVisitors":{"anyOf":[{"type":"object","properties":{"visitors":{"type":"number"},"new":{"type":"number"},"returning":{"type":"number"}},"required":["visitors","new","returning"],"additionalProperties":false},{"type":"null"}],"description":"Only with Returning visitors switched on: the visitors who accepted its cookie, each counted once over the period, split into new and returning. Null when none did."},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"newContacts":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["visitors","sessions","bounceRate","avgSessionSeconds","viewsPerSession","returningVisitors","views","leads","newContacts","conversionRate"],"additionalProperties":{}},"highlights":{"type":"array","items":{"type":"string"},"description":"What changed most, in sentences."},"topPages":{"type":"array","items":{}},"topLeadPages":{"type":"array","items":{}},"topSources":{"type":"array","items":{}}},"required":["period","previous","notes","metrics","highlights","topPages","topLeadPages","topSources"],"additionalProperties":{},"description":"The site’s headline numbers."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"metrics":{"visitors":{"current":1630,"previous":1402,"change":0.163},"sessions":{"current":1910,"previous":1655,"change":0.154},"bounceRate":{"current":0.46,"previous":0.49,"change":-0.061},"avgSessionSeconds":{"current":94,"previous":88,"change":0.068},"viewsPerSession":{"current":2.2,"previous":2.2,"change":0},"returningVisitors":null,"views":{"current":4210,"previous":3650,"change":0.153},"leads":{"current":38,"previous":29,"change":0.31},"newContacts":{"current":31,"previous":25,"change":0.24},"conversionRate":{"current":0.009,"previous":0.0079,"change":0.139},"payments":{"current":6,"previous":4,"change":0.5},"revenue":[{"currency":"nzd","amount":{"current":184000,"previous":120000,"change":0.533},"payments":{"current":6,"previous":4,"change":0.5}}],"search":null,"workflows":{"runs":{"current":52,"previous":40,"change":0.3},"failed":{"current":1,"previous":0,"change":null}}},"highlights":["Leads rose 31% (29 to 38) against the period before.","/services/hot-water brought the most leads (14)."],"topPages":[{"path":"/","title":"Home","views":{"current":1820,"previous":1700,"change":0.071},"leads":{"current":9,"previous":8,"change":0.125}}],"topLeadPages":[{"path":"/services/hot-water","title":"Hot water","leads":{"current":14,"previous":6,"change":1.333},"conversionRate":0.0311}],"topSources":[{"source":"google.com","channel":"search","views":{"current":1490,"previous":1210,"change":0.231},"visitors":{"current":640,"previous":520,"change":0.231},"leads":{"current":12,"previous":9,"change":0.333}}],"topEntryPages":[{"path":"/","title":"Home","entries":{"current":980,"previous":870,"change":0.126},"bounceRate":0.41}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/traffic":{"get":{"operationId":"getAnalyticsTraffic","tags":["Analytics"],"summary":"Traffic over time","description":"Visitors, sessions, page views and leads per day, week or month, with totals (views per day, conversion rate, bounce rate, average session length) against the comparison period, and the busiest stretch. Visitors and sessions are counted without cookies by a hash that changes every day, so `visitors` over several days is daily visitors, summed, not distinct people. `returningVisitors` counts distinct people only for visitors who accepted the optional Returning visitors cookie.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"]},"description":"How to group the series: day (default), week (from Monday) or month."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"granularity":{"type":"string","enum":["day","week","month"]},"totals":{"type":"object","properties":{"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"viewsPerDay":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"visitors":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Daily visitors, summed: unique visitors per UTC day, counted without cookies, added up over the period. One person who comes on three days counts three times."},"sessions":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Visits: a session ends after 30 minutes without activity."},"bounceRate":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"The share of sessions that saw one page (0.42 is 42%)."},"avgSessionSeconds":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Average session length in seconds, from the first view to leaving the last page."},"viewsPerSession":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"returningVisitors":{"anyOf":[{"type":"object","properties":{"visitors":{"type":"number"},"new":{"type":"number"},"returning":{"type":"number"}},"required":["visitors","new","returning"],"additionalProperties":false},{"type":"null"}],"description":"Only with Returning visitors switched on: the visitors who accepted its cookie, each counted once over the period, split into new and returning. Null when none did."}},"required":["views","leads","viewsPerDay","conversionRate","visitors","sessions","bounceRate","avgSessionSeconds","viewsPerSession","returningVisitors"],"additionalProperties":{}},"series":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"views":{"type":"number"},"leads":{"type":"number"},"visitors":{"type":"number","description":"Daily visitors, summed over the bucket."},"sessions":{"type":"number"}},"required":["start","end","views","leads","visitors","sessions"],"additionalProperties":false}}},"required":["period","previous","notes","granularity","totals","series"],"additionalProperties":{},"description":"Traffic over time."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"granularity":"week","totals":{"views":{"current":4210,"previous":3650,"change":0.153},"leads":{"current":38,"previous":29,"change":0.31},"viewsPerDay":{"current":135.8,"previous":121.7,"change":0.116},"conversionRate":{"current":0.009,"previous":0.0079,"change":0.139},"visitors":{"current":1630,"previous":1402,"change":0.163},"sessions":{"current":1910,"previous":1655,"change":0.154},"bounceRate":{"current":0.46,"previous":0.49,"change":-0.061},"avgSessionSeconds":{"current":94,"previous":88,"change":0.068},"viewsPerSession":{"current":2.2,"previous":2.2,"change":0},"returningVisitors":null},"busiest":{"start":"2026-10-12","end":"2026-10-18","views":1104,"leads":12,"visitors":402,"sessions":470},"series":[{"start":"2026-10-01","end":"2026-10-04","views":512,"leads":4,"visitors":201,"sessions":236}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/pages":{"get":{"operationId":"getAnalyticsPages","tags":["Analytics"],"summary":"Top pages","description":"Pages by views, leads or entries, each with its views, the leads sent from forms on it, its conversion rate, its entries (sessions that started on it) and their bounce rate, and the change against the comparison period. Sort by leads (sort=leads) to answer \"which pages bring the most enquiries?\" and by entries (sort=entries) for the pages people land on.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"How many rows to return (default 20)."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["views","leads","entries"]},"description":"Order by views (default), leads or entries."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"sort":{"type":"string","enum":["views","leads","entries"]},"totals":{"type":"object","properties":{"pages":{"type":"number"},"views":{"type":"number"},"leads":{"type":"number"}},"required":["pages","views","leads"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"title":{"type":["string","null"]},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"number"},"entries":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"Sessions that started on this page."},"bounceRate":{"type":"number","description":"The share of those sessions that saw no other page."}},"required":["path","title","views","leads","conversionRate","entries","bounceRate"],"additionalProperties":false}}},"required":["period","previous","notes","sort","totals","items"],"additionalProperties":{},"description":"Pages with their views and leads."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"sort":"leads","totals":{"pages":14,"views":4210,"leads":38},"items":[{"path":"/services/hot-water","title":"Hot water","views":{"current":450,"previous":380,"change":0.184},"leads":{"current":14,"previous":6,"change":1.333},"conversionRate":0.0311,"entries":{"current":210,"previous":160,"change":0.313},"bounceRate":0.38}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/sources":{"get":{"operationId":"getAnalyticsSources","tags":["Analytics"],"summary":"Where visitors come from","description":"Referring sites (google.com, instagram.com, chatgpt.com…) with their views, the visitors and sessions that started from them, the leads sent in those visits, share and change, grouped into channels: direct, search, social, ai, email and referral. A lead’s source is the first referrer of the visit it was sent in; leads from before visitor counting started have none.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"How many rows to return (default 20)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"totals":{"type":"object","properties":{"views":{"type":"number"},"leadsWithSource":{"type":"number","description":"Leads in the period with a known source."}},"required":["views","leadsWithSource"],"additionalProperties":false},"channels":{"type":"array","items":{"type":"object","properties":{"channel":{"type":"string"},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"visitors":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"share":{"type":"number"}},"required":["channel","views","visitors","leads","share"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"channel":{"type":"string"},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"visitors":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"sessions":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"share":{"type":"number"}},"required":["source","channel","views","visitors","sessions","leads","share"],"additionalProperties":false}}},"required":["period","previous","notes","totals","channels","items"],"additionalProperties":{},"description":"Traffic sources."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"totals":{"views":4210,"leadsWithSource":31},"channels":[{"channel":"search","views":{"current":1600,"previous":1300,"change":0.231},"visitors":{"current":690,"previous":560,"change":0.232},"leads":{"current":13,"previous":9,"change":0.444},"share":0.38}],"items":[{"source":"google.com","channel":"search","views":{"current":1490,"previous":1210,"change":0.231},"visitors":{"current":640,"previous":520,"change":0.231},"sessions":{"current":720,"previous":600,"change":0.2},"leads":{"current":12,"previous":9,"change":0.333},"share":0.354}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/devices":{"get":{"operationId":"getAnalyticsDevices","tags":["Analytics"],"summary":"Phones, tablets and computers","description":"Views and leads by device class (mobile, tablet, desktop), with share, conversion rate and change. Only the class is kept, never the browser details.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":["string","null"]},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"share":{"type":"number"},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"number"}},"required":["key","label","views","share","leads","conversionRate"],"additionalProperties":false}}},"required":["period","previous","notes","items"],"additionalProperties":{},"description":"Views and leads by device."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"items":[{"key":"mobile","label":"Phone","views":{"current":2900,"previous":2400,"change":0.208},"share":0.689,"leads":{"current":22,"previous":15,"change":0.467},"conversionRate":0.0076}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/countries":{"get":{"operationId":"getAnalyticsCountries","tags":["Analytics"],"summary":"Countries","description":"Views and leads by country (two-letter code and English name), with share, conversion rate and change.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"How many rows to return (default 20)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":["string","null"]},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"share":{"type":"number"},"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"number"}},"required":["key","label","views","share","leads","conversionRate"],"additionalProperties":false}}},"required":["period","previous","notes","items"],"additionalProperties":{},"description":"Views and leads by country."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"items":[{"key":"NZ","label":"New Zealand","views":{"current":3700,"previous":3300,"change":0.121},"share":0.879,"leads":{"current":36,"previous":28,"change":0.286},"conversionRate":0.0097}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/conversions":{"get":{"operationId":"getAnalyticsConversions","tags":["Analytics"],"summary":"Conversions","description":"What visits turned into: form submissions (leads) by form, payments and revenue by currency, and the conversion rate (leads divided by page views), with a series and the change against the comparison period. Bookings made in an outside scheduler are not counted (`bookings` is null).\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"]},"description":"How to group the series: day (default), week (from Monday) or month."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"granularity":{"type":"string","enum":["day","week","month"]},"totals":{"type":"object","properties":{"leads":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"payments":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"views":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"conversionRate":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"revenue":{"type":"array","items":{}},"bookings":{"type":"null"}},"required":["leads","payments","views","conversionRate","revenue","bookings"],"additionalProperties":{}},"forms":{"type":"array","items":{"type":"object","properties":{"formId":{"type":"string"},"key":{"type":["string","null"]},"name":{"type":"string"},"submissions":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["formId","key","name","submissions"],"additionalProperties":false}},"series":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"leads":{"type":"number"},"payments":{"type":"number"}},"required":["start","end","leads","payments"],"additionalProperties":false}}},"required":["period","previous","notes","granularity","totals","forms","series"],"additionalProperties":{},"description":"Conversions."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"granularity":"month","totals":{"leads":{"current":38,"previous":29,"change":0.31},"payments":{"current":6,"previous":4,"change":0.5},"views":{"current":4210,"previous":3650,"change":0.153},"conversionRate":{"current":0.009,"previous":0.0079,"change":0.139},"revenue":[{"currency":"nzd","amount":{"current":184000,"previous":120000,"change":0.533},"payments":{"current":6,"previous":4,"change":0.5}}],"bookings":null},"forms":[{"formId":"frm_1","key":"contact","name":"Contact","submissions":{"current":30,"previous":22,"change":0.364}}],"series":[{"start":"2026-10-01","end":"2026-10-31","leads":38,"payments":6}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/leads":{"get":{"operationId":"getAnalyticsLeads","tags":["Analytics"],"summary":"Leads by source and stage","description":"New contacts by where they came from (each form, payments, message channels, added by hand), the pipeline by stage (how many are in each now, how many new ones landed there, and how many moved into it in the period), and new contacts and leads over time, against the comparison period.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"]},"description":"How to group the series: day (default), week (from Monday) or month."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"granularity":{"type":"string","enum":["day","week","month"]},"totals":{"type":"object","properties":{"newContacts":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"contactsNow":{"type":"number"}},"required":["newContacts","contactsNow"],"additionalProperties":{}},"bySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":["string","null"]},"label":{"type":"string"},"contacts":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["source","label","contacts"],"additionalProperties":false}},"stages":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string"},"label":{"type":"string"},"now":{"type":"number"},"newInPeriod":{"type":"number"},"movedIn":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["stage","label","now","newInPeriod","movedIn"],"additionalProperties":false}},"series":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"newContacts":{"type":"number"},"leads":{"type":"number"}},"required":["start","end","newContacts","leads"],"additionalProperties":false}}},"required":["period","previous","notes","granularity","totals","bySource","stages","series"],"additionalProperties":{},"description":"Leads by source and stage."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"granularity":"week","totals":{"newContacts":{"current":31,"previous":25,"change":0.24},"leads":{"current":38,"previous":29,"change":0.31},"contactsNow":412},"bySource":[{"source":"form:contact","label":"Form: Contact","contacts":{"current":24,"previous":20,"change":0.2}}],"stages":[{"stage":"call","label":"Call booked","now":18,"newInPeriod":3,"movedIn":{"current":9,"previous":5,"change":0.8}}],"series":[{"start":"2026-09-28","end":"2026-10-04","newContacts":6,"leads":8}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}},"/sites/{siteId}/analytics/revenue":{"get":{"operationId":"getAnalyticsRevenue","tags":["Analytics"],"summary":"Revenue","description":"Revenue by currency (minor units, cents) and by plan, active subscriptions now, and revenue over time in the main currency, against the comparison period. Totals only; list single payments with GET /sites/{siteId}/payments.\n\nScope: `analytics:read`. Plan feature: `payments`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"]},"description":"How to group the series: day (default), week (from Monday) or month."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"granularity":{"type":"string","enum":["day","week","month"]},"currencies":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"payments":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["currency","amount","payments"],"additionalProperties":false}},"plans":{"type":"array","items":{"type":"object","properties":{"plan":{"type":["string","null"]},"mode":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"number"},"payments":{"type":"number"}},"required":["plan","mode","currency","amount","payments"],"additionalProperties":false}},"activeSubscriptions":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"count":{"type":"number"},"amount":{"type":"number"}},"required":["currency","count","amount"],"additionalProperties":false}},"series":{"type":"object","properties":{"currency":{"type":["string","null"]},"points":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"},"amount":{"type":"number"}},"required":["start","end","amount"],"additionalProperties":false}}},"required":["currency","points"],"additionalProperties":false}},"required":["period","previous","notes","granularity","currencies","plans","activeSubscriptions","series"],"additionalProperties":{},"description":"Revenue."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"granularity":"month","currencies":[{"currency":"nzd","amount":{"current":184000,"previous":120000,"change":0.533},"payments":{"current":6,"previous":4,"change":0.5}}],"plans":[{"plan":"service-call","mode":"payment","currency":"nzd","amount":144000,"payments":4}],"activeSubscriptions":[{"currency":"nzd","count":3,"amount":59700}],"series":{"currency":"nzd","points":[{"start":"2026-10-01","end":"2026-10-31","amount":184000}]}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"payments"}},"/sites/{siteId}/analytics/search":{"get":{"operationId":"getAnalyticsSearch","tags":["Analytics"],"summary":"Google search","description":"Google Search Console for the site: clicks, impressions, click rate (ctr) and average position against the comparison period, a series, the top queries and pages with their change, and opportunities (queries close to page one, or on page one with few clicks). Needs Search Console connected under Growth; `connection` says whether it is and how recent the data is (Google reports about two days late).\n\nScope: `analytics:read`. Plan feature: `growth.search`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."},{"name":"granularity","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"]},"description":"How to group the series: day (default), week (from Monday) or month."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"How many queries, pages and opportunities to return (default 20)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"connection":{"type":"object","properties":{"connected":{"type":"boolean"},"property":{"type":["string","null"]},"lastSyncAt":{"type":["string","null"]},"dataThrough":{"type":["string","null"]}},"required":["connected","property","lastSyncAt","dataThrough"],"additionalProperties":false},"totals":{"type":"object","properties":{"clicks":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"impressions":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"ctr":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"position":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."}},"required":["clicks","impressions","ctr","position"],"additionalProperties":false},"series":{"type":"array","items":{}},"queries":{"type":"array","items":{}},"pages":{"type":"array","items":{}},"opportunities":{"type":"array","items":{"type":"object","properties":{"query":{"type":"string"},"page":{"type":"string"},"clicks":{"type":"number"},"impressions":{"type":"number"},"ctr":{"type":"number"},"position":{"type":"number"},"reason":{"type":"string","enum":["near-page-one","low-ctr"]}},"required":["query","page","clicks","impressions","ctr","position","reason"],"additionalProperties":false}}},"required":["period","previous","notes","connection","totals","series","queries","pages","opportunities"],"additionalProperties":{},"description":"Google search performance."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"connection":{"connected":true,"property":"https://acme.example/","lastSyncAt":"2026-11-23T04:00:00.000Z","dataThrough":"2026-11-21"},"totals":{"clicks":{"current":610,"previous":540,"change":0.13},"impressions":{"current":18400,"previous":15100,"change":0.219},"ctr":{"current":0.0332,"previous":0.0358,"change":-0.073},"position":{"current":11.2,"previous":12.9,"change":-0.132}},"queries":[{"query":"emergency plumber auckland","clicks":{"current":140,"previous":120,"change":0.167},"impressions":{"current":2100,"previous":1900,"change":0.105},"ctr":0.0667,"position":{"current":3.1,"previous":3.4,"change":-0.088}}],"opportunities":[{"query":"hot water cylinder repair","page":"/services/hot-water","clicks":4,"impressions":820,"ctr":0.0049,"position":8.7,"reason":"near-page-one"}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"growth.search"}},"/sites/{siteId}/analytics/workflows":{"get":{"operationId":"getAnalyticsWorkflows","tags":["Analytics"],"summary":"Workflow runs","description":"For each workflow: runs, successes, failures, failure rate, average run time and its latest failure, against the comparison period. Test runs are left out. Read single runs with GET /sites/{siteId}/workflows/{workflowId}/runs.\n\nScope: `analytics:read`. Plan feature: `workflows`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"totals":{"type":"object","properties":{"workflows":{"type":"number"},"enabled":{"type":"number"},"runs":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"failed":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"failureRate":{"type":"number"}},"required":["workflows","enabled","runs","failed","failureRate"],"additionalProperties":{}},"items":{"type":"array","items":{"type":"object","properties":{"workflowId":{"type":"string"},"name":{"type":"string"},"runs":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"failed":{"type":"object","properties":{"current":{"type":"number"},"previous":{"description":"The same measure in the comparison period; null with compare=none.","type":["number","null"]},"change":{"description":"(current - previous) / previous: 0.25 is 25% up. Null when previous is 0 or missing.","type":["number","null"]}},"required":["current","previous","change"],"additionalProperties":false,"description":"A number with its comparison."},"failureRate":{"type":"number"},"averageSeconds":{"type":["number","null"]}},"required":["workflowId","name","runs","failed","failureRate","averageSeconds"],"additionalProperties":{}}}},"required":["period","previous","notes","totals","items"],"additionalProperties":{},"description":"Workflow run statistics."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"totals":{"workflows":3,"enabled":3,"runs":{"current":52,"previous":40,"change":0.3},"failed":{"current":1,"previous":0,"change":null},"failureRate":0.0192},"items":[{"workflowId":"wf_1","name":"Reply to new enquiries","enabled":true,"trigger":"trigger.form","runs":{"current":38,"previous":29,"change":0.31},"succeeded":37,"failed":{"current":1,"previous":0,"change":null},"inProgress":0,"failureRate":0.0263,"averageSeconds":4.2,"lastFailure":{"error":"Email bounced","at":"2026-10-19T02:11:00.000Z"}}]}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"workflows"}},"/sites/{siteId}/analytics/health":{"get":{"operationId":"getAnalyticsHealth","tags":["Analytics"],"summary":"Site health","description":"What could hold the site back: published pages missing their Google title or description (or with ones too long or short, duplicated, or hidden from search), pages with no views in the period, Google index status when Search Console is connected, the latest PageSpeed score and the latest growth report with its open suggestions.\n\nScope: `analytics:read`. Plan feature: `analytics`.","parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string"},"description":"The site’s id."},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","yesterday","7d","14d","28d","30d","90d","365d","this_week","last_week","this_month","last_month","this_quarter","last_quarter","this_year","last_year"]},"description":"A named period in the site’s time zone. 7d, 28d and the like end today; this_month runs from the 1st to today; last_month is the whole month before. Default 28d. Leave it out when you send from and to."},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The first day, YYYY-MM-DD, in the site’s time zone. Use with to for any range up to 800 days."},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"description":"The last day, YYYY-MM-DD, included. Default today."},{"name":"compare","in":"query","required":false,"schema":{"type":"string","enum":["previous","year","none"]},"description":"What to compare with: previous (default: the period before; a whole month against the whole month before), year (the same dates a year earlier) or none."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"period":{"type":"object","properties":{"preset":{"type":"string","description":"The named period, or custom for from and to."},"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"timeZone":{"type":"string","description":"The time zone the days are in."},"timeZoneSource":{"type":"string","enum":["site","default"],"description":"site: the site’s own time zone. default: none is set, so UTC."}},"required":["preset","from","to","days","timeZone","timeZoneSource"],"additionalProperties":false},"previous":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["from","to","days"],"additionalProperties":false},{"type":"null"}],"description":"The comparison period, or null with compare=none."},"notes":{"type":"array","items":{"type":"string"},"description":"What the numbers do and don’t include. Worth passing on."},"seo":{"type":"object","properties":{"publishedPages":{"type":"number"},"missingSeoTitle":{"type":"number"},"missingDescription":{"type":"number"},"noindex":{"type":"number"},"duplicateTitles":{"type":"number"},"pagesWithIssues":{"type":"number"}},"required":["publishedPages","missingSeoTitle","missingDescription","noindex","duplicateTitles","pagesWithIssues"],"additionalProperties":false},"pagesWithoutViews":{"type":"array","items":{"type":"string"}},"pages":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"seoTitle":{"type":["string","null"]},"description":{"type":["string","null"]},"views":{"type":"number"},"issues":{"type":"array","items":{"type":"string"}}},"required":["path","kind","title","seoTitle","description","views","issues"],"additionalProperties":false}},"index":{"anyOf":[{"type":"object","properties":{"checked":{"type":"number"},"indexed":{"type":"number"},"notIndexed":{"type":"array","items":{}}},"required":["checked","indexed","notIndexed"],"additionalProperties":{}},{"type":"null"}]},"pagespeed":{"anyOf":[{},{"type":"null"}]},"growthReport":{"anyOf":[{},{"type":"null"}]}},"required":["period","previous","notes","seo","pagesWithoutViews","pages","index","pagespeed","growthReport"],"additionalProperties":{},"description":"Site health."},"example":{"period":{"preset":"last_month","from":"2026-10-01","to":"2026-10-31","days":31,"timeZone":"Pacific/Auckland","timeZoneSource":"site"},"previous":{"from":"2026-09-01","to":"2026-09-30","days":30},"notes":["Page views count every page opened, so a person who opens three pages counts three times.","Visitors and sessions are counted without cookies, by a hash of the IP address and browser that changes every day and is never stored with either. A visitor is unique within one UTC day, so over several days visitors are daily visitors, summed: someone who comes on three days counts three times. A session ends after 30 minutes without activity."],"seo":{"publishedPages":14,"missingSeoTitle":1,"missingDescription":3,"noindex":0,"duplicateTitles":0,"pagesWithIssues":4},"pagesWithoutViews":["/careers"],"pages":[{"path":"/careers","kind":"page","title":"Careers","seoTitle":null,"description":null,"views":0,"issues":["no-seo-title","no-description"]}],"index":{"checked":14,"indexed":12,"notIndexed":[{"path":"/careers","coverage":"Discovered - currently not indexed","lastCrawl":null}]},"pagespeed":{"url":"https://acme.example/","score":91},"growthReport":{"id":"grw_1","periodStart":"2026-10-01","periodEnd":"2026-10-31","summary":"A strong month for leads.","openSuggestions":2,"createdAt":"2026-11-03T20:00:00.000Z"}}}}},"401":{"description":"No key, or the key isn’t valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (insufficient_scope) or the role this needs, or the site’s plan lacks the feature (feature_not_in_plan).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found, or not reachable with this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The body is invalid; details say which values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests; wait for RateLimit-Reset seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-unvop-scope":"analytics:read","x-unvop-feature":"analytics"}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"unvop_live_<prefix>_<secret>","description":"An API key from Settings, Developers. Its scopes decide what it can do."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"A stable machine-readable code, such as not_found, invalid_request, insufficient_scope or rate_limited."},"message":{"type":"string","description":"What went wrong, in a sentence a person can act on."},"details":{"description":"More about the error. Validation errors list `issues` or `fields` keyed by the path of the value."}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Every error has this shape."}}},"x-unvop-scopes":{"sites:write":"Create new sites and delete sites.","content:read":"Read sites, pages, blocks, collections, media, forms, design and settings.","content:write":"Create, edit, publish and delete pages, blocks, collections, entries and forms.","contacts:read":"Read contacts, the pipeline, activity and form submissions.","contacts:write":"Add, edit and delete contacts, add notes and delete submissions.","media:write":"Upload, describe and delete images, videos and files.","design:write":"Change brand tokens and the site stylesheet.","payments:read":"Read payments taken through the site.","analytics:read":"Read visits, pages, sources, devices, countries, leads, conversions, revenue totals, Google search data, workflow run counts and site health. No one’s personal details.","workflows:read":"Read workflows, their templates, the node catalog and runs.","workflows:write":"Create, edit, publish, test, run and delete workflows.","tools:read":"Read tools and their templates.","tools:write":"Create, edit and delete tools, and run their queries.","connections:read":"Read connections to outside APIs and collection sources. Secret values are never returned.","connections:write":"Create, edit, test and delete connections, and change collection sources.","settings:write":"Change site settings and turn plugins on, off and configure them.","generate":"Start AI site builds from a prompt and follow them.","keys:write":"List, create and revoke platform API keys."},"x-unvop-mcp":{"url":"https://platform.unvop.com/mcp","transport":"streamable-http"}}