{"openapi":"3.1.0","info":{"title":"contentworker API","description":"API-first, AI-agentic-first headless CMS. Management (CMA), Delivery (CDA), and Preview (CPA) surfaces — this deployment serves role \"all\". Every capability is also exposed as an MCP tool at POST /mcp.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key (CMA/CDA/CPA, hashed at rest) or the admin token. Keys are minted at POST /spaces/{space}/api-keys."}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"System","description":"Liveness/readiness probes."},{"name":"Auth","description":"Principal resolution (web sign-in, API keys), and ending a person’s credentials."},{"name":"Spaces & environments","description":"Spaces, environments (branches), aliases, compare/merge, and space config."},{"name":"Roles & permissions","description":"Custom roles with content-type + field grants."},{"name":"Audit","description":"Append-only audit trail of mutating actions."},{"name":"Content types","description":"The content model: types, fields, publishing."},{"name":"Taxonomy","description":"Tags, concepts, and concept schemes (SKOS-style)."},{"name":"Entries","description":"Authoring: drafts, publishing, bulk operations, metadata."},{"name":"Versions","description":"Append-only entry version history, diff, and restore."},{"name":"Assets","description":"Media: presigned direct uploads, publishing, transforms."},{"name":"Comments & tasks","description":"Editorial collaboration on entries."},{"name":"Workflows","description":"Editorial workflow definitions and entry transitions."},{"name":"Releases & scheduling","description":"Grouped releases and scheduled publish/unpublish actions."},{"name":"Webhooks","description":"Signed event webhooks and delivery logs."},{"name":"Functions","description":"User-defined HTTP functions invoked on domain events."},{"name":"Apps","description":"App extensions (custom field editors, sidebars)."},{"name":"AI & agents","description":"Generation, translation, moderation, semantic tooling, AI actions, and the agent run ledger."},{"name":"Guides","description":"The product's own documentation, served over the API so agents can look up conventions with the token they already hold."},{"name":"Delivery","description":"Published content: REST, hybrid search, SSE, GraphQL."},{"name":"Preview","description":"Draft/current content for previews."}],"paths":{"/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Liveness probe","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}},"required":["status"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/ready":{"get":{"operationId":"getReady","tags":["System"],"summary":"Readiness probe (reports the mounted role)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ready"},"role":{"type":"string"}},"required":["status","role"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/deployment/people/{subject}/credentials":{"delete":{"operationId":"deleteDeploymentPeopleBySubjectCredentials","tags":["Auth"],"summary":"Revoke every token a person holds","description":"Revokes the OAuth access tokens and grants, personal access tokens and setup credentials held by `subject` (the person's web user id), in every space. Deployment administrators only.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"subject","required":true}]}},"/auth/me":{"get":{"operationId":"getAuthMe","tags":["Auth"],"summary":"Resolve the calling principal","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","description":"Space id, or `*` for the admin token"},"kind":{"type":"string","enum":["cma","cda","cpa","admin","user"]},"scopes":{"type":"array","items":{"type":"string"}},"restricted":{"type":"boolean"}},"required":["spaceId","kind","scopes"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/guides":{"get":{"operationId":"getGuides","tags":["Guides"],"summary":"List documentation pages","description":"Lists contentworker's documentation pages with their headings and sizes, so a client can find which page covers a topic before reading it. Requires any valid token; there is no space in the path and nothing space-specific in the response.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/guides/search":{"get":{"operationId":"getGuidesSearch","tags":["Guides"],"summary":"Search the documentation","description":"Full-text search across every page (`q`, optional `path` and `limit`). Every term must appear on the same line. Each match names the page, the nearest heading above it, and the line, so a hit can be followed with a section read.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/guides/{path}":{"get":{"operationId":"getGuidesByPath","tags":["Guides"],"summary":"Read a documentation page","description":"Returns one page as Markdown, or one section of it when `section` names a heading slug from the listing — that heading down to the next of the same level.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"path","required":true}]}},"/spaces":{"post":{"operationId":"postSpaces","tags":["Spaces & environments"],"summary":"Create a space","description":"Creates a space with its locales and environments (`main` by default), optionally with sample content (`starter: \"sample\"`), installed before the response returns. Deployment administrators only: the admin token, or a person signed in to the admin as a deployment admin. A space's own API keys can't create spaces. Creating a space whose id exists updates its name and locales; repeating a `sample` create finishes an install that failed part-way without duplicating anything.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$","description":"1–64 letters, digits, \".\", \"_\" or \"-\", starting with a letter or digit"},"name":{"type":"string","maxLength":256},"defaultLocale":{"type":"string","minLength":2,"maxLength":35},"locales":{"maxItems":200,"type":"array","items":{"type":"string","minLength":2,"maxLength":35}},"fallbacks":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{"anyOf":[{"type":"string","minLength":2,"maxLength":35},{"type":"null"}]}},"environments":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"starter":{"description":"`sample` installs sample content into the first environment: a content model covering every field type, a few dozen entries, taxonomy, sample images and documents, and one open release. `empty` (the default) creates the space with nothing in it.","type":"string","enum":["empty","sample"]}},"required":["spaceId","name","defaultLocale"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"starter":{"type":"string","enum":["empty","sample"]},"installed":{"description":"What the sample starter holds once installed (absent for `empty`)","type":"object","properties":{"contentTypes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"entries":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"assets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tags":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"concepts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"releases":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["contentTypes","entries","assets","tags","concepts","releases"],"additionalProperties":false}},"required":["id","name","starter"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}},"get":{"summary":"GET /spaces","tags":["Spaces & environments"],"parameters":[],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}":{"delete":{"operationId":"deleteSpacesBySpaceEnvironmentsByEnv","tags":["Spaces & environments"],"summary":"Delete an environment and everything in it","description":"Removes the environment, its content model, entries, versions, assets, releases, workflows and the rest (its audit history stays); search documents, vectors and the delivery cache are cleaned up asynchronously. Refuses `main` and any environment an alias points at (409).","parameters":[{"name":"confirm","in":"query","required":false,"schema":{"type":"string"},"description":"The environment id again (required: deleting is irreversible)"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/api-keys":{"get":{"operationId":"getSpacesBySpaceApiKeys","tags":["Auth"],"summary":"List API keys for a space","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]},"post":{"operationId":"postSpacesBySpaceApiKeys","tags":["Auth"],"summary":"Mint an API key","description":"The raw token is returned once; only its SHA-256 hash is stored.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["cma","cda","cpa"]},"name":{"type":"string","maxLength":256},"scopes":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":64}},"roleId":{"type":"string","minLength":1,"maxLength":128}},"required":["kind"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["cma","cda","cpa"]},"token":{"type":"string","description":"Shown once — only its SHA-256 hash is stored"}},"required":["id","kind","token"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/personal-access-tokens":{"post":{"operationId":"postSpacesBySpacePersonalAccessTokens","tags":["Auth"],"summary":"Mint a personal access token","description":"Scopes are intersected with the caller’s own. The raw token is returned once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":256},"scopes":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","maxLength":64}},"expiresInDays":{"type":"integer","minimum":1,"maximum":365}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"kind":{"type":"string","enum":["cma","cda","cpa"]},"token":{"type":"string","description":"Shown once — only its SHA-256 hash is stored"}},"required":["id","kind","token"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]},"get":{"operationId":"getSpacesBySpacePersonalAccessTokens","tags":["Auth"],"summary":"List personal access tokens","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/oauth/connections":{"get":{"operationId":"getSpacesBySpaceOauthConnections","tags":["Auth"],"summary":"List applications connected via OAuth","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/oauth/connections/revoke":{"post":{"operationId":"postSpacesBySpaceOauthConnectionsRevoke","tags":["Auth"],"summary":"Disconnect an OAuth application","description":"Revokes every access token the client holds for that subject, and the grants behind them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"type":"string","minLength":1,"maxLength":128},"subject":{"type":"string","minLength":1,"maxLength":320}},"required":["clientId","subject"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/environments/{env}/export":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvExport","tags":["Spaces & environments"],"summary":"Export an environment as a snapshot","description":"Portable JSON: content model, entries, taxonomy, workflows, and asset METADATA. Never includes credentials (API keys, OAuth clients, webhook secrets) or asset binaries.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/import":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvImport","tags":["Spaces & environments"],"summary":"Import a snapshot into this environment","description":"Replays the snapshot through the normal use-cases, so validation, the reference graph and the delivery read model all end up consistent. Requires an environment with no content types. Everything is checked before anything is written; then the content model, taxonomy and workflows are written and the assets and entries run as a job (202: `{ report, job, publishJobId }`; follow it at this environment's `bulk/jobs/:id`, then the publishing job, which starts once it completes with no failures). `?dryRun=true` reports without writing (200).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"snapshotVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"exportedAt":{"type":"string"},"source":{"type":"object","properties":{"spaceId":{"type":"string"},"environmentId":{"type":"string"}},"required":["spaceId","environmentId"]},"contentTypes":{"maxItems":1000,"type":"array","items":{}},"entries":{"maxItems":100000,"type":"array","items":{}},"assets":{"maxItems":100000,"type":"array","items":{}},"taxonomy":{"type":"object","properties":{"schemes":{"maxItems":1000,"type":"array","items":{}},"concepts":{"maxItems":10000,"type":"array","items":{}},"tags":{"maxItems":10000,"type":"array","items":{}}},"required":["schemes","concepts","tags"]},"workflows":{"maxItems":1000,"type":"array","items":{}}},"required":["snapshotVersion","contentTypes","entries"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/clone":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvClone","tags":["Spaces & environments"],"summary":"Clone this environment into another","description":"Export plus import with no file in between. The target may be in another space, which is the case environment merge does not cover. Runs entirely as jobs (202: `{ job, createJobId, publishJobId }`): `job` exports the source, checks it (a refused snapshot fails it, its report naming the problems) and starts `createJobId`, whose clean completion starts `publishJobId` (when anything is published). All belong to the target environment: follow them at its `bulk/jobs/:id`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"targetSpaceId":{"type":"string","minLength":1,"maxLength":128},"targetEnvironmentId":{"type":"string","minLength":1,"maxLength":128},"publish":{"type":"boolean"}},"required":["targetEnvironmentId"]}}}},"responses":{"202":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/imports/sources":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvImportsSources","tags":["Spaces & environments"],"summary":"List import sources","description":"The external formats this deployment can read.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/imports/analyze":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvImportsAnalyze","tags":["Spaces & environments"],"summary":"Analyze an import without writing","description":"Reports what the import would create, update and skip — plus the source fields nothing maps to (the data it would throw away) and the records that would fail. Writes nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"string","minLength":1,"maxLength":20000000},"mapping":{"type":"object","properties":{"contentTypeApiId":{"type":"string","minLength":1,"maxLength":128},"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"string","maxLength":256}},"identityField":{"type":"string","minLength":1,"maxLength":128},"locale":{"type":"string","minLength":2,"maxLength":35}},"required":["contentTypeApiId","fields"]},"sourceOptions":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}},"conflicts":{"type":"string","enum":["skip","update","fail"]}},"required":["source","payload","mapping"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/imports":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvImports","tags":["Spaces & environments"],"summary":"Run an import","description":"Creates entries through the same use-cases as any other write, so validation, uniqueness and the reference graph all apply. Entries arrive as drafts; publishing them is a separate bulk job. Re-analyzes first, so a stale plan cannot be acted on.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"string","minLength":1,"maxLength":20000000},"mapping":{"type":"object","properties":{"contentTypeApiId":{"type":"string","minLength":1,"maxLength":128},"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"string","maxLength":256}},"identityField":{"type":"string","minLength":1,"maxLength":128},"locale":{"type":"string","minLength":2,"maxLength":35}},"required":["contentTypeApiId","fields"]},"sourceOptions":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}},"conflicts":{"type":"string","enum":["skip","update","fail"]}},"required":["source","payload","mapping"]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/imports/job":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvImportsJob","tags":["Spaces & environments"],"summary":"Run an import as a durable job","description":"Same planner and same report as the synchronous run, but the writing is chunked into a resumable job — so an import survives a crash, a deploy, and a client that hung up. Poll `…/bulk/jobs/:id` for progress and `…/bulk/jobs/:id/report` for per-record failures.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":64},"payload":{"type":"string","minLength":1,"maxLength":20000000},"mapping":{"type":"object","properties":{"contentTypeApiId":{"type":"string","minLength":1,"maxLength":128},"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"string","maxLength":256}},"identityField":{"type":"string","minLength":1,"maxLength":128},"locale":{"type":"string","minLength":2,"maxLength":35}},"required":["contentTypeApiId","fields"]},"sourceOptions":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}},"conflicts":{"type":"string","enum":["skip","update","fail"]}},"required":["source","payload","mapping"]}}}},"responses":{"202":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/plugins":{"post":{"operationId":"postSpacesBySpacePlugins","tags":["Apps"],"summary":"Install a plugin","description":"Installs DISABLED. `approvedCapabilities` is the human consent and may be narrower than the manifest requests, never wider; each capability is also checked against the installer’s own scopes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"manifest":{"type":"object","properties":{},"additionalProperties":{}},"bundle":{"type":"string","minLength":1,"maxLength":2000000},"approvedCapabilities":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":64}}},"required":["manifest","bundle","approvedCapabilities"]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]},"get":{"summary":"GET /spaces/{space}/plugins","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/plugins/{id}":{"put":{"operationId":"putSpacesBySpacePluginsById","tags":["Apps"],"summary":"Upgrade a plugin","description":"A version requesting capabilities beyond the current grant requires `approvedCapabilities` and lands disabled, so an upgrade can never widen authority quietly.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"manifest":{"type":"object","properties":{},"additionalProperties":{}},"bundle":{"type":"string","minLength":1,"maxLength":2000000},"approvedCapabilities":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":64}}},"required":["manifest","bundle","approvedCapabilities"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"get":{"summary":"GET /spaces/{space}/plugins/{id}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/plugins/{id}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/plugins/from-url/inspect":{"post":{"operationId":"postSpacesBySpacePluginsFromUrlInspect","tags":["Apps"],"summary":"Inspect a plugin package without installing it","description":"Fetches and verifies a package exactly as install would, and returns what it found — so a consent screen can show the manifest before anything is approved. Install with `expectedChecksum` set to the checksum returned here, and a release swapped in between the two calls is refused rather than installed under the wrong approval.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageUrl":{"type":"string","maxLength":2048,"format":"uri"},"expectedChecksum":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},"expectedId":{"type":"string","maxLength":128},"expectedVersion":{"type":"string","maxLength":64},"minimumReleaseAgeHours":{"type":"integer","minimum":0,"maximum":8760}},"required":["packageUrl"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/plugins/from-url":{"post":{"operationId":"postSpacesBySpacePluginsFromUrl","tags":["Apps"],"summary":"Install a plugin from a URL","description":"Fetches a package descriptor over HTTPS, verifies the bundle against the SHA-256 it declares, and installs it DISABLED. `expectedChecksum` pins the release, so bytes that changed since the approval are refused rather than installed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageUrl":{"type":"string","maxLength":2048,"format":"uri"},"expectedChecksum":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},"expectedId":{"type":"string","maxLength":128},"expectedVersion":{"type":"string","maxLength":64},"approvedCapabilities":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":64}},"minimumReleaseAgeHours":{"type":"integer","minimum":0,"maximum":8760}},"required":["packageUrl","approvedCapabilities"]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/plugins/{id}/from-url":{"put":{"operationId":"putSpacesBySpacePluginsByIdFromUrl","tags":["Apps"],"summary":"Upgrade a plugin from a URL","description":"Same verification as install. A version requesting more than the current grant needs `approvedCapabilities` and lands disabled.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packageUrl":{"type":"string","maxLength":2048,"format":"uri"},"expectedChecksum":{"type":"string","pattern":"^[a-fA-F0-9]{64}$"},"expectedId":{"type":"string","maxLength":128},"expectedVersion":{"type":"string","maxLength":64},"approvedCapabilities":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":64}},"minimumReleaseAgeHours":{"type":"integer","minimum":0,"maximum":8760}},"required":["packageUrl"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/plugins/{id}/capabilities":{"post":{"operationId":"postSpacesBySpacePluginsByIdCapabilities","tags":["Apps"],"summary":"Approve a plugin’s capabilities","description":"Records a fresh capability decision without changing the code: re-approves a plugin flagged `needsReapproval`, narrows a grant, or grants something the manifest requested that was declined earlier. Never wider than the manifest or the approver’s own scopes; a grant that grows disables the plugin until it is re-enabled.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"approvedCapabilities":{"maxItems":32,"type":"array","items":{"type":"string","maxLength":64}}},"required":["approvedCapabilities"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/content-types":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvContentTypes","tags":["Content types"],"summary":"List content types","description":"`?format=typescript` returns the content model as a TypeScript module instead of JSON — the same output the codegen CLI produces, served from the live model so CI and coding agents need nothing installed to type against it.","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string"},"description":"json (default) | typescript"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}},"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvContentTypes","tags":["Content types"],"summary":"Create a content type","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"apiId":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":256},"displayField":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","maxLength":256},"fields":{"maxItems":500,"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["apiId","name","displayField","fields"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"apiId":{"type":"string"},"name":{"type":"string"},"displayField":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"apiId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","description":"Field type (Symbol, Text, Integer, Reference, …)"},"localized":{"type":"boolean"},"required":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["apiId","name","type","localized","required","position"],"additionalProperties":false}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","published"]}},"required":["apiId","name","displayField","fields","version","status"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/content-types/{apiId}":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvContentTypesByApiId","tags":["Content types"],"summary":"Get a content type","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"apiId":{"type":"string"},"name":{"type":"string"},"displayField":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"apiId":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","description":"Field type (Symbol, Text, Integer, Reference, …)"},"localized":{"type":"boolean"},"required":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["apiId","name","type","localized","required","position"],"additionalProperties":false}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","published"]}},"required":["apiId","name","displayField","fields","version","status"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"apiId","required":true}]}},"/spaces/{space}/environments/{env}/entries":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntries","tags":["Entries"],"summary":"Create a draft entry","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contentTypeApiId":{"type":"string","minLength":1,"maxLength":128},"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}}}},"required":["contentTypeApiId"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["entry"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvEntriesById","tags":["Entries"],"summary":"Get an entry (draft state)","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteSpacesBySpaceEnvironmentsByEnvEntriesById","tags":["Entries"],"summary":"Move an entry to the trash","description":"Unpublishes the entry first when it is live, so delivery stops serving it. Idempotent. Restore it, or delete it permanently, from the trash.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"put":{"operationId":"putSpacesBySpaceEnvironmentsByEnvEntriesById","tags":["Entries"],"summary":"Save a new draft version","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}}}},"required":["fields"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}/restore":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntriesByIdRestore","tags":["Entries"],"summary":"Restore an entry from the trash","description":"Comes back as a draft; re-publishing is a separate action.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}/permanent":{"delete":{"operationId":"deleteSpacesBySpaceEnvironmentsByEnvEntriesByIdPermanent","tags":["Entries"],"summary":"Permanently delete a trashed entry","description":"Irreversible. Refuses with 409 while published entries still link to it, unless ?force=true. Requires content:publish, not merely content:write.","responses":{"204":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}/duplicate":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntriesByIdDuplicate","tags":["Entries"],"summary":"Duplicate an entry","description":"Copies fields and taxonomy metadata into a new draft.","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"entry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false},"warnings":{"type":"array","items":{"type":"string"}}},"required":["entry"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/search/index":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvSearchIndex","tags":["AI & agents"],"summary":"Report lexical search index health","description":"Compares the documents the SearchShard lexical index holds for this environment against the number of published entries. `bound: false` means the index is not bound and the lexical leg runs on the store's built-in term matching. A negative `drift` means published entries are missing from the index; a positive one means it holds documents for entries that are no longer published. The remedy is POST search/reindex, which rewrites both the vector and lexical legs.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/search/reindex":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvSearchReindex","tags":["AI & agents"],"summary":"Request a reindex of all published entries","description":"Enqueues a background reindex (via the outbox → queue) that re-embeds every published entry in the environment (optionally one content type). Returns 202; the work runs on the worker. Rate-limited per scope (429 if requested too soon).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contentTypeApiId":{"type":"string","minLength":1,"maxLength":128}}}}}},"responses":{"202":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}/published":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntriesByIdPublished","tags":["Entries"],"summary":"Publish an entry","description":"Writes the delivery read model and appends entry.published to the transactional outbox atomically.","parameters":[{"name":"expectedVersion","in":"query","required":false,"schema":{"type":"string"},"description":"The entry's currentVersion as the caller read it; 409 if it has changed since"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}},"delete":{"operationId":"deleteSpacesBySpaceEnvironmentsByEnvEntriesByIdPublished","tags":["Entries"],"summary":"Unpublish an entry","parameters":[{"name":"expectedVersion","in":"query","required":false,"schema":{"type":"string"},"description":"The entry's currentVersion as the caller read it; 409 if it has changed since"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"UUIDv7 entry id"},"contentTypeApiId":{"type":"string"},"status":{"type":"string","enum":["draft","published","changed","archived"]},"currentVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"publishedVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"}},"required":["id","contentTypeApiId","status","currentVersion"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/environments/{env}/entries/{id}/versions/{version}/restore":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntriesByIdVersionsByVersionRestore","tags":["Entries"],"summary":"Restore a version","description":"Copies the version's fields into a new draft version.","parameters":[{"name":"expectedVersion","in":"query","required":false,"schema":{"type":"string"},"description":"The entry's currentVersion as the caller read it; 409 if it has changed since"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/environments/{env}/assets":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvAssets","tags":["Assets"],"summary":"Create an asset (presigned direct upload)","description":"PUT the file bytes to upload.url with upload.headers, then publish the asset.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":1024},"contentType":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}},"description":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}}},"required":["fileName","contentType"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileName":{"type":"string"},"contentType":{"type":"string","description":"MIME type"},"status":{"type":"string","enum":["draft","published"]},"url":{"type":"string"}},"required":["id","fileName","contentType"],"additionalProperties":false},"upload":{"type":"object","properties":{"url":{"type":"string","description":"Signed PUT URL — upload bytes directly here (root-relative when the deployment has no MEDIA_BASE_URL)"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["url","headers"],"additionalProperties":false}},"required":["asset","upload"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]},"get":{"summary":"GET /spaces/{space}/environments/{env}/assets","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/videos":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvAssetsVideos","tags":["Assets"],"summary":"Create a video asset (direct upload to the video host)","description":"POST the file as multipart field upload.fileField to upload.uploadUrl, then poll /assets/{id}/video/refresh (or rely on the host webhook) until file.video.status is ready. 501 when no video host is bound.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":1024},"contentType":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}},"description":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":35},"additionalProperties":{}},"maxDurationSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["fileName","contentType"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileName":{"type":"string"},"contentType":{"type":"string","description":"MIME type"},"status":{"type":"string","enum":["draft","published"]},"url":{"type":"string"}},"required":["id","fileName","contentType"],"additionalProperties":false},"upload":{"type":"object","properties":{"videoId":{"type":"string","description":"The video host's id for the upload"},"uploadUrl":{"type":"string","format":"uri","description":"One-time direct upload URL on the video host"},"method":{"type":"string","const":"POST"},"fileField":{"type":"string","description":"Multipart form field carrying the file"}},"required":["videoId","uploadUrl","method","fileField"],"additionalProperties":false}},"required":["asset","upload"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/assets/{id}/video/refresh":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvAssetsByIdVideoRefresh","tags":["Assets"],"summary":"Refresh a video asset's processing status from the video host","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileName":{"type":"string"},"contentType":{"type":"string","description":"MIME type"},"status":{"type":"string","enum":["draft","published"]},"url":{"type":"string"}},"required":["id","fileName","contentType"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/webhooks":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWebhooks","tags":["Webhooks"],"summary":"List webhooks","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]},"post":{"summary":"POST /spaces/{space}/environments/{env}/webhooks","tags":["Webhooks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/workflows":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflows","tags":["Workflows"],"summary":"Create a workflow","description":"Legacy `{name, steps}` converts the steps to a graph and publishes it as version 1 (the response is the workflow). A graph body `{name, description?, contentTypes?, graph?, gatesPublish?}` creates an unpublished draft and answers `{workflow, validation}`; drafts may be incomplete, only shape errors refuse.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"name":{"type":"string","maxLength":256},"steps":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","maxLength":256},"requiredScope":{"type":"string","maxLength":64}},"required":["id","name","requiredScope"]}}},"required":["name","steps"]},{"type":"object","properties":{"name":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":2000},"contentTypes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"graph":{},"gatesPublish":{"type":"boolean"}},"required":["name"]}]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]},"get":{"summary":"GET /spaces/{space}/environments/{env}/workflows","tags":["Workflows"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/workflows/validate":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowsValidate","tags":["Workflows"],"summary":"Validate a workflow graph","description":"Runs the same shape and semantic checks the editor, copilot and publishing use. Saves nothing. Answers `{ok, errors, warnings}`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{}},"required":["graph"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/workflows/copilot":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowsCopilot","tags":["Workflows"],"summary":"Draft or edit a workflow graph with AI","description":"Proposes a graph from a plain-language `prompt` (editing `graph` when given). Read-only: it never saves. Answers the normalized graph, an explanation, the validation issues, `changes` against the input and `summary` (a one-line description of the changes). Falls back to a heuristic when the model is unavailable (see `provenance`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"graph":{},"contentTypes":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}}},"required":["prompt"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/environments/{env}/workflows/{id}/draft":{"put":{"operationId":"putSpacesBySpaceEnvironmentsByEnvWorkflowsByIdDraft","tags":["Workflows"],"summary":"Save a workflow draft","description":"Updates the editable draft; omitted fields keep their value. Never touches published versions or running runs. Answers `{workflow, validation}`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":256},"description":{"type":"string","maxLength":2000},"contentTypes":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"graph":{},"gatesPublish":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflows/{id}/versions":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowsByIdVersions","tags":["Workflows"],"summary":"Publish the draft as a new version","description":"Appends the draft as the next immutable, numbered version; new runs pin it. Refused (422) while validation reports errors. `publishedBy` records the caller.","responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowsByIdVersions","tags":["Workflows"],"summary":"List published versions","description":"Newest first.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflows/{id}/versions/{version}":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowsByIdVersionsByVersion","tags":["Workflows"],"summary":"Get one published version","description":"Versions outlive a deleted definition: runs pinned to them keep loading.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"version","required":true}]}},"/spaces/{space}/environments/{env}/entries/{id}/workflow-runs":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvEntriesByIdWorkflowRuns","tags":["Workflows"],"summary":"Start a workflow run on an entry","description":"Starts a run of a published version (the latest unless `version` is given) of a workflow whose trigger is `trigger.manual`. Needs `content:write` on the entry’s content type; the run then acts as the caller. One active run per workflow and entry (409). 501 when the deployment has no EDITORIAL_WF binding.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workflowId":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"input":{"type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{}},"vars":{"type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{}}},"required":["workflowId"]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-runs":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowRuns","tags":["Workflows"],"summary":"List workflow runs","description":"Runs on content types the caller can’t read are left out.","parameters":[{"name":"entryId","in":"query","required":false,"schema":{"type":"string"},"description":"Only runs on this entry"},{"name":"workflowId","in":"query","required":false,"schema":{"type":"string"},"description":"Only runs of this workflow"},{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"One of queued, running, waiting, completed, declined, cancelled, failed, rolled_back"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Default 50, at most 200"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/environments/{env}/workflow-runs/{id}":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowRunsById","tags":["Workflows"],"summary":"Get a workflow run","description":"Status, plan, per-node detail and what it waits on.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-runs/{id}/timeline":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowRunsByIdTimeline","tags":["Workflows"],"summary":"Get a run’s timeline","description":"Oldest first.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-runs/{id}/node-runs":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowRunsByIdNodeRuns","tags":["Workflows"],"summary":"List a run’s finished node runs","description":"Timing, outputs and who each node ran as; oldest first.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-runs/{id}/cancel":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowRunsByIdCancel","tags":["Workflows"],"summary":"Cancel a workflow run","description":"Stops the durable instance, undoes finished compensable steps newest first, closes open tasks and ends the run `cancelled`. Cancelling a finished run does nothing (`ok: false`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-runs/{id}/events":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowRunsByIdEvents","tags":["Workflows"],"summary":"Deliver an event to a run","description":"Delivers a business event to the `control.wait_event` node waiting for it. An event nothing waits for yet is held on the run (`buffered: true`) for the first wait for it that opens.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event":{"type":"string","minLength":1,"maxLength":100},"payload":{"type":"object","propertyNames":{"type":"string","maxLength":128},"additionalProperties":{}}},"required":["event"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-tasks":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowTasks","tags":["Workflows"],"summary":"List workflow tasks","description":"Approvals, event waits and agent reviews runs hold open. Tasks on content types the caller can’t read are left out.","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"},"description":"One of pending, approved, rejected, escalated, received, timeout, applied, cancelled"},{"name":"runId","in":"query","required":false,"schema":{"type":"string"},"description":"Only this run’s tasks"},{"name":"entryId","in":"query","required":false,"schema":{"type":"string"},"description":"Only tasks on this entry"},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"approval, event or review"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Default 50, at most 200"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/environments/{env}/workflow-tasks/{id}":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowTasksById","tags":["Workflows"],"summary":"Get a workflow task","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-tasks/{id}/decide":{"post":{"operationId":"postSpacesBySpaceEnvironmentsByEnvWorkflowTasksByIdDecide","tags":["Workflows"],"summary":"Approve or reject a task","description":"Decides an approval (or an agent review a run waits on). The caller needs the task’s `requiredScope` (default `workflow:approve`) and the matching content-type grant. With separation of duties the run’s starter can’t decide, and an API token can’t decide at all (a person must).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected"]},"note":{"type":"string","maxLength":2000}},"required":["decision"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/environments/{env}/workflow-settings":{"get":{"operationId":"getSpacesBySpaceEnvironmentsByEnvWorkflowSettings","tags":["Workflows"],"summary":"Read the space’s workflow settings","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]},"put":{"operationId":"putSpacesBySpaceEnvironmentsByEnvWorkflowSettings","tags":["Workflows"],"summary":"Set the space’s workflow settings","description":"`separateDuties` is the default for approvals whose node leaves it unset; it applies to approvals opened from then on. Needs `space:admin`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"separateDuties":{"type":"boolean"}},"required":["separateDuties"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}]}},"/spaces/{space}/team":{"get":{"operationId":"getSpacesBySpaceTeam","tags":["Auth"],"summary":"List the team: people and long-lived keys with their roles","description":"People (who sign in with SSO) and API keys with their role and whether each counts as an administrator. `adminCount` is how many administrators the space has: the last one cannot be demoted, disabled, removed or revoked.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/role-presets":{"get":{"operationId":"getSpacesBySpaceRolePresets","tags":["Auth"],"summary":"List the built-in role presets","description":"Viewer, Approver, Editor, Manager and Administrator, each seeded into the space as an editable role. Each includes everything the one before it can do.","responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/roles/{id}/clone":{"post":{"operationId":"postSpacesBySpaceRolesByIdClone","tags":["Auth"],"summary":"Clone a role into a new custom role","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":256}}}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/members":{"post":{"operationId":"postSpacesBySpaceMembers","tags":["Auth"],"summary":"Add a person to the team","description":"They sign in with SSO; their email links them on first sign-in.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"name":{"type":"string","maxLength":256},"role":{"type":"string","minLength":1,"maxLength":128}},"required":["email","role"]}}}},"responses":{"201":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/spaces/{space}/members/{id}":{"patch":{"operationId":"patchSpacesBySpaceMembersById","tags":["Auth"],"summary":"Change a person’s role, name or access","description":"Refused with 409 `last_admin` when it would leave the space with no administrator.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":128},"disabled":{"type":"boolean"},"name":{"type":"string","maxLength":256}}}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteSpacesBySpaceMembersById","tags":["Auth"],"summary":"Remove a person from the team","responses":{"204":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/api-keys/{id}/role":{"put":{"operationId":"putSpacesBySpaceApiKeysByIdRole","tags":["Auth"],"summary":"Change an API key’s role","description":"A role id or preset name; `null` unbinds the key (its kind’s default scopes). Refused with 409 `last_admin` when it would leave the space with no administrator.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]}},"required":["role"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/spaces/{space}/access-settings":{"put":{"operationId":"putSpacesBySpaceAccessSettings","tags":["Auth"],"summary":"Change how people sign in to the space","description":"`ssoOnly`: people sign in only through SSO, and the administrator credential setup created stops working. Needs SSO configured and an administrator on the team.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ssoOnly":{"type":"boolean"}},"required":["ssoOnly"]}}}},"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true}]}},"/delivery/{space}/{env}/search":{"get":{"operationId":"getDeliveryBySpaceByEnvSearch","tags":["Delivery"],"summary":"Search published content","description":"Hybrid search by default: Vectorize ANN + the FTS5 SearchShard full-text index, fused with Reciprocal Rank Fusion.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Search query"},{"name":"mode","in":"query","required":false,"schema":{"type":"string"},"description":"hybrid (default) | semantic | lexical"},{"name":"top_k","in":"query","required":false,"schema":{"type":"string"},"description":"Max hits (default 10)"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"hits":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"score":{"type":"number","description":"Relevance (RRF-fused for hybrid mode)"},"snippet":{"type":"string"}},"required":["entryId","score","snippet"],"additionalProperties":false}}},"required":["hits"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/delivery/{space}/{env}/entries":{"get":{"operationId":"getDeliveryBySpaceByEnvEntries","tags":["Delivery"],"summary":"List published entries","parameters":[{"name":"content_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by content type apiId"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Resolve fields for one locale"},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Reference resolution depth"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentType":{"type":"string","description":"Content type apiId"},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","contentType","fields","publishedAt"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","total"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/delivery/{space}/{env}/entries/{id}":{"get":{"operationId":"getDeliveryBySpaceByEnvEntriesById","tags":["Delivery"],"summary":"Get a published entry","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Resolve fields for one locale"},{"name":"include","in":"query","required":false,"schema":{"type":"string"},"description":"Reference resolution depth"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentType":{"type":"string","description":"Content type apiId"},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","contentType","fields","publishedAt"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/delivery/{space}/{env}/assets":{"get":{"operationId":"getDeliveryBySpaceByEnvAssets","tags":["Delivery"],"summary":"List published assets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max items"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/delivery/{space}/{env}/assets/{id}":{"get":{"operationId":"getDeliveryBySpaceByEnvAssetsById","tags":["Delivery"],"summary":"Get a published asset","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"fileName":{"type":"string"},"contentType":{"type":"string","description":"MIME type"},"status":{"type":"string","enum":["draft","published"]},"url":{"type":"string"}},"required":["id","fileName","contentType"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/delivery/{space}/{env}/live":{"get":{"operationId":"getDeliveryBySpaceByEnvLive","tags":["Delivery"],"summary":"Live Content API (SSE)","parameters":[{"name":"types","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated event-type filter, e.g. entry.published"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"text/event-stream of published-content domain events for this scope"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/delivery/{space}/{env}/assets/{id}/transform":{"get":{"operationId":"getDeliveryBySpaceByEnvAssetsByIdTransform","tags":["Delivery"],"summary":"Resolve a transformed image URL","parameters":[{"name":"w","in":"query","required":false,"schema":{"type":"string"},"description":"Width"},{"name":"h","in":"query","required":false,"schema":{"type":"string"},"description":"Height"},{"name":"fit","in":"query","required":false,"schema":{"type":"string"},"description":"Fit mode"},{"name":"fm","in":"query","required":false,"schema":{"type":"string"},"description":"Output format: auto (AVIF/WebP negotiated from Accept) | jpg | png | webp | avif"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Quality"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"302":{"description":"Redirects to the CDN-transformable image URL"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/preview/{space}/{env}/suggest":{"get":{"operationId":"getPreviewBySpaceByEnvSuggest","tags":["Preview"],"summary":"Suggest entries for a chooser","description":"Entries whose display field matches `q`, resolved server-side. A chooser cannot be built by listing entries and filtering in the browser: the list endpoint is capped, so entries past one page are not slow to find but impossible to pick.","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"What has been typed so far; empty returns recent entries"},{"name":"content_type","in":"query","required":false,"schema":{"type":"string"},"description":"Restrict to one content type"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Locale the title is resolved in"},{"name":"limit","in":"query","required":false,"schema":{"type":"string"},"description":"Max results (default 20, max 50)"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/preview/{space}/{env}/entries":{"get":{"operationId":"getPreviewBySpaceByEnvEntries","tags":["Preview"],"summary":"List draft/current entries","parameters":[{"name":"content_type","in":"query","required":false,"schema":{"type":"string"},"description":"Filter by content type apiId"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Resolve one locale"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"contentType":{"type":"string","description":"Content type apiId"},"fields":{"type":"object","propertyNames":{"type":"string","description":"Field apiId"},"additionalProperties":{"type":"object","propertyNames":{"type":"string","description":"BCP-47 locale tag"},"additionalProperties":{},"description":"Localized value: locale → value (non-localized fields use the default locale)"},"description":"Entry field values by field apiId"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["id","contentType","fields","publishedAt"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["items","total"],"additionalProperties":false}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/preview/{space}/{env}/entries/{id}":{"get":{"operationId":"getPreviewBySpaceByEnvEntriesById","tags":["Preview"],"summary":"Get a draft/current entry","description":"Accepts a bearer token or a shareable ?preview_token= minted from the entry.","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Resolve one locale"},{"name":"preview_token","in":"query","required":false,"schema":{"type":"string"},"description":"Shareable preview token"},{"schema":{"type":"string"},"in":"path","name":"space","required":true},{"schema":{"type":"string"},"in":"path","name":"env","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}},"403":{"description":"Token lacks the required scope for this space","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"description":"Error envelope"}}}}}}},"/spaces/{space}/environments":{"get":{"summary":"GET /spaces/{space}/environments","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environment-aliases":{"get":{"summary":"GET /spaces/{space}/environment-aliases","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environment-aliases/{alias}":{"put":{"summary":"PUT /spaces/{space}/environment-aliases/{alias}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"alias","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environment-aliases/{alias}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"alias","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/audit-log":{"get":{"summary":"GET /spaces/{space}/audit-log","tags":["Audit"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/compare":{"get":{"summary":"GET /spaces/{space}/compare","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/merge":{"post":{"summary":"POST /spaces/{space}/merge","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/api-keys/{id}":{"delete":{"summary":"DELETE /spaces/{space}/api-keys/{id}","tags":["Auth"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/plugins/{id}/enabled":{"post":{"summary":"POST /spaces/{space}/plugins/{id}/enabled","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/roles":{"get":{"summary":"GET /spaces/{space}/roles","tags":["Roles & permissions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/roles","tags":["Roles & permissions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/roles/{id}":{"get":{"summary":"GET /spaces/{space}/roles/{id}","tags":["Roles & permissions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"put":{"summary":"PUT /spaces/{space}/roles/{id}","tags":["Roles & permissions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/roles/{id}","tags":["Roles & permissions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/space-config":{"get":{"summary":"GET /spaces/{space}/environments/{env}/space-config","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/content-types/{apiId}/published":{"post":{"summary":"POST /spaces/{space}/environments/{env}/content-types/{apiId}/published","tags":["Content types"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"apiId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/generate":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/generate","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/canvas":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/canvas","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/preview-link":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/preview-link","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/reverse-references":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/reverse-references","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/translate":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/translate","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/summarize":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/summarize","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/autofill":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/autofill","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/suggest-tags":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/suggest-tags","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/apply-tags":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/apply-tags","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/functions":{"get":{"summary":"GET /spaces/{space}/environments/{env}/functions","tags":["Functions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/functions","tags":["Functions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/functions/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/functions/{id}","tags":["Functions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/app-extensions":{"get":{"summary":"GET /spaces/{space}/environments/{env}/app-extensions","tags":["Apps"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/app-extensions","tags":["Apps"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/app-extensions/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/app-extensions/{id}","tags":["Apps"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/entries":{"post":{"summary":"POST /spaces/{space}/environments/{env}/bulk/entries","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/entries/publish":{"post":{"summary":"POST /spaces/{space}/environments/{env}/bulk/entries/publish","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/entries/unpublish":{"post":{"summary":"POST /spaces/{space}/environments/{env}/bulk/entries/unpublish","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/jobs":{"post":{"summary":"POST /spaces/{space}/environments/{env}/bulk/jobs","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"get":{"summary":"GET /spaces/{space}/environments/{env}/bulk/jobs","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/jobs/{id}":{"get":{"summary":"GET /spaces/{space}/environments/{env}/bulk/jobs/{id}","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/jobs/{id}/report":{"get":{"summary":"GET /spaces/{space}/environments/{env}/bulk/jobs/{id}/report","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/bulk/jobs/{id}/cancel":{"post":{"summary":"POST /spaces/{space}/environments/{env}/bulk/jobs/{id}/cancel","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/audit":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/audit","tags":["Audit"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/moderate":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/moderate","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/related":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/related","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/duplicates":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/duplicates","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/embedding":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/embedding","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/versions":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/versions","tags":["Versions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/versions/diff":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/versions/diff","tags":["Versions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/versions/{version}":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/versions/{version}","tags":["Versions"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}":{"get":{"summary":"GET /spaces/{space}/environments/{env}/assets/{id}","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/metadata":{"patch":{"summary":"PATCH /spaces/{space}/environments/{env}/assets/{id}/metadata","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/usage":{"get":{"summary":"GET /spaces/{space}/environments/{env}/assets/{id}/usage","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/transform":{"get":{"summary":"GET /spaces/{space}/environments/{env}/assets/{id}/transform","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/alt-text":{"post":{"summary":"POST /spaces/{space}/environments/{env}/assets/{id}/alt-text","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/auto-tag":{"post":{"summary":"POST /spaces/{space}/environments/{env}/assets/{id}/auto-tag","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/assets/{id}/published":{"post":{"summary":"POST /spaces/{space}/environments/{env}/assets/{id}/published","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/assets/{id}/published","tags":["Assets"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/ai-actions":{"get":{"summary":"GET /spaces/{space}/environments/{env}/ai-actions","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/ai-actions","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/ai-actions/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/ai-actions/{id}","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/ai-actions/{id}/run":{"post":{"summary":"POST /spaces/{space}/environments/{env}/ai-actions/{id}/run","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-runs":{"get":{"summary":"GET /spaces/{space}/environments/{env}/agent-runs","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-runs/usage":{"get":{"summary":"GET /spaces/{space}/environments/{env}/agent-runs/usage","tags":["AI & agents"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/webhooks/{id}":{"put":{"summary":"PUT /spaces/{space}/environments/{env}/webhooks/{id}","tags":["Webhooks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/webhooks/{id}","tags":["Webhooks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/webhooks/{id}/deliveries":{"get":{"summary":"GET /spaces/{space}/environments/{env}/webhooks/{id}/deliveries","tags":["Webhooks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/releases":{"get":{"summary":"GET /spaces/{space}/environments/{env}/releases","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/releases","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/releases/{id}":{"get":{"summary":"GET /spaces/{space}/environments/{env}/releases/{id}","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/releases/{id}","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/releases/{id}/items":{"post":{"summary":"POST /spaces/{space}/environments/{env}/releases/{id}/items","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/releases/{id}/items/{entityId}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/releases/{id}/items/{entityId}","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"entityId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/releases/{id}/published":{"post":{"summary":"POST /spaces/{space}/environments/{env}/releases/{id}/published","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/scheduled-actions":{"get":{"summary":"GET /spaces/{space}/environments/{env}/scheduled-actions","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/scheduled-actions","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/scheduled-actions/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/scheduled-actions/{id}","tags":["Releases & scheduling"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-schedules":{"get":{"summary":"GET /spaces/{space}/environments/{env}/agent-schedules","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/agent-schedules","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-schedules/{id}":{"patch":{"summary":"PATCH /spaces/{space}/environments/{env}/agent-schedules/{id}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/agent-schedules/{id}","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-reviews":{"get":{"summary":"GET /spaces/{space}/environments/{env}/agent-reviews","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-reviews/{id}/approve":{"post":{"summary":"POST /spaces/{space}/environments/{env}/agent-reviews/{id}/approve","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/agent-reviews/{id}/reject":{"post":{"summary":"POST /spaces/{space}/environments/{env}/agent-reviews/{id}/reject","tags":["Spaces & environments"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/comments":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/comments","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/comments","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/comments/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/comments/{id}","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/tasks":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/tasks","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/tasks","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/tasks/{id}":{"put":{"summary":"PUT /spaces/{space}/environments/{env}/tasks/{id}","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/tasks/{id}","tags":["Comments & tasks"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/workflows/{id}":{"get":{"summary":"GET /spaces/{space}/environments/{env}/workflows/{id}","tags":["Workflows"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/workflows/{id}","tags":["Workflows"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/workflow":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/workflow","tags":["Workflows"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/workflow/transition":{"post":{"summary":"POST /spaces/{space}/environments/{env}/entries/{id}/workflow/transition","tags":["Workflows"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/schemes":{"get":{"summary":"GET /spaces/{space}/environments/{env}/taxonomy/schemes","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/taxonomy/schemes","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/schemes/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/taxonomy/schemes/{id}","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/concepts":{"get":{"summary":"GET /spaces/{space}/environments/{env}/taxonomy/concepts","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/taxonomy/concepts","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/concepts/{id}/broader":{"put":{"summary":"PUT /spaces/{space}/environments/{env}/taxonomy/concepts/{id}/broader","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/concepts/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/taxonomy/concepts/{id}","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/tags":{"get":{"summary":"GET /spaces/{space}/environments/{env}/taxonomy/tags","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"post":{"summary":"POST /spaces/{space}/environments/{env}/taxonomy/tags","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/taxonomy/tags/{id}":{"delete":{"summary":"DELETE /spaces/{space}/environments/{env}/taxonomy/tags/{id}","tags":["Taxonomy"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}},"/spaces/{space}/environments/{env}/entries/{id}/metadata":{"get":{"summary":"GET /spaces/{space}/environments/{env}/entries/{id}/metadata","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}},"put":{"summary":"PUT /spaces/{space}/environments/{env}/entries/{id}/metadata","tags":["Entries"],"parameters":[{"name":"space","in":"path","required":true,"schema":{"type":"string"}},{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"}}}}},"x-tagGroups":[{"name":"Platform","tags":["System","Auth","Spaces & environments","Roles & permissions","Audit"]},{"name":"Content model","tags":["Content types","Taxonomy"]},{"name":"Authoring","tags":["Entries","Versions","Assets","Comments & tasks","Workflows"]},{"name":"Publishing & automation","tags":["Releases & scheduling","Webhooks","Functions","Apps"]},{"name":"AI","tags":["AI & agents"]},{"name":"Reference","tags":["Guides"]},{"name":"Delivery","tags":["Delivery","Preview"]}]}