{"openapi":"3.1.0","info":{"title":"Spacefast API","version":"0.8.1","description":"API for sharing AI artifacts, managing spaces, claiming anonymous publishes, and operating versions.\n\nThe API is versioned in the URL path (`/v1`). Operations marked `deprecated` also send RFC 9745 `Deprecation` and RFC 8594 `Sunset` headers, plus a `Link` with `rel=\"deprecation\"` pointing at the versioning and deprecation policy: https://spacefast.com/docs/api/versioning"},"servers":[{"url":"https://api.spacefast.com"}],"components":{"securitySchemes":{"oauth2":{"type":"oauth2","description":"OAuth 2.0 with explicit Spacefast capability scopes. Use the authorization-code flow for people and client credentials for machines.","flows":{"authorizationCode":{"authorizationUrl":"https://api.spacefast.com/v1/auth/oauth2/authorize","tokenUrl":"https://api.spacefast.com/v1/auth/oauth2/token","scopes":{"teams:read":"Read the teams the account belongs to.","teams:create":"Create teams.","teams:members.write":"Invite people to teams that the account can administer.","sell:write":"Set up Sell, enable live sales, resend downloads, and mark orders shipped.","spaces:read":"Read spaces, versions, and build status.","spaces:write":"Create and update spaces and their settings.","spaces:rename":"Rename space slugs and managed addresses.","spaces:access.write":"Change who can open a site, including making it public through its published configuration.","spaces:delete":"Delete sites.","versions:download":"Read files from deployment versions.","publish:write":"Publish new immutable versions.","domains:read":"Read Space hostnames and certificate status. Read domain registrations and DNS records when enabled.","domains:write":"Manage Space hostnames. Buy domains and manage DNS records when enabled.","connectors:read":"Read connected services, their tools, and what policy allows.","connectors:write":"Connect and disconnect services, and set tool policy.","connectors:execute":"Run tools on services this team connected — acts with real accounts, on real data.","person-pages:read":"Read private pages other people shared with the account personally.","spaces:publish":"Publish a version to an existing space.","builds:trigger":"Start a build for an existing version.","offline_access":"Refresh access without another interactive sign-in."}},"clientCredentials":{"tokenUrl":"https://api.spacefast.com/v1/auth/oauth2/token","scopes":{"teams:read":"Read the teams the account belongs to.","teams:create":"Create teams.","teams:members.write":"Invite people to teams that the account can administer.","sell:write":"Set up Sell, enable live sales, resend downloads, and mark orders shipped.","spaces:read":"Read spaces, versions, and build status.","spaces:write":"Create and update spaces and their settings.","spaces:rename":"Rename space slugs and managed addresses.","spaces:access.write":"Change who can open a site, including making it public through its published configuration.","spaces:delete":"Delete sites.","versions:download":"Read files from deployment versions.","publish:write":"Publish new immutable versions.","domains:read":"Read Space hostnames and certificate status. Read domain registrations and DNS records when enabled.","domains:write":"Manage Space hostnames. Buy domains and manage DNS records when enabled.","connectors:read":"Read connected services, their tools, and what policy allows.","connectors:write":"Connect and disconnect services, and set tool policy.","connectors:execute":"Run tools on services this team connected — acts with real accounts, on real data.","spaces:publish":"Publish a version to an existing space.","builds:trigger":"Start a build for an existing version."}}}},"bearerAuth":{"type":"http","scheme":"bearer","description":"Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential."},"atomicApiKey":{"type":"apiKey","in":"header","name":"Auth","description":"Spacefast API key in the wp.cloud `Auth` header. Accepted only by the wp.cloud-compatible `/v0/atomic-api` operations."},"claimTokenAuth":{"type":"http","scheme":"bearer","description":"Space key (sfc_…) for an unclaimed anonymous Space. Also the fragment of its claim URL and the token of its /__/ door. A publish without a credential returns it in `claim` with the claim link. With the key, `getSpace` extends the Space's expiry window, `getSpaceVersion` follows its publish, `createSpaceOpenLink` returns its reusable open link, and `restoreSpace` undoes a `deleteSpace` while the claim window remains open."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"__Host-better-auth.session_token","description":"Signed-in browser session, set by the dashboard sign-in flow. An operation that declares only this one needs a person behind the request: an API key or machine credential is refused. The same session token is also accepted as `Authorization: Bearer`."}},"schemas":{"Problem":{"type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false},"TrafficRuleClause":{"type":"object","properties":{"op":{"type":"string","enum":["eq","neq","in","inCidr","contains","startsWith","endsWith","wildcard","exists"],"description":"How the request attribute is compared to the value."},"value":{"description":"Single value to compare against.","type":"string","minLength":1,"maxLength":4096},"values":{"description":"Values to compare against, for `in` and `inCidr`.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"not":{"description":"Match when the comparison does not hold.","type":"boolean"}},"required":["op"],"additionalProperties":false,"description":"An explicit comparison, for the operators the shorthands cannot express."},"TrafficRuleValue":{"anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},{"$ref":"#/components/schemas/TrafficRuleClause"}],"description":"What the field has to match. A string with a `*` in it matches as a wildcard, any other string matches exactly, and a list matches any of its values. An `ip` value with a `/` in it matches a CIDR range. Everything else is an explicit clause: { \"op\": \"exists\" }, { \"op\": \"contains\", \"value\": \"bot\" }, { \"op\": \"in\", \"values\": [\"RU\"], \"not\": true }."},"TrafficRuleMatch":{"type":"object","properties":{"path":{"$ref":"#/components/schemas/TrafficRuleValue"},"host":{"$ref":"#/components/schemas/TrafficRuleValue"},"method":{"$ref":"#/components/schemas/TrafficRuleValue"},"ip":{"$ref":"#/components/schemas/TrafficRuleValue"},"country":{"description":"Two-letter country codes.","$ref":"#/components/schemas/TrafficRuleValue"},"asn":{"$ref":"#/components/schemas/TrafficRuleValue"},"userAgent":{"$ref":"#/components/schemas/TrafficRuleValue"},"referer":{"$ref":"#/components/schemas/TrafficRuleValue"},"header":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"$ref":"#/components/schemas/TrafficRuleValue"},"description":"Per-name conditions: { \"x-api-client\": { \"op\": \"exists\" } }."},"cookie":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"$ref":"#/components/schemas/TrafficRuleValue"},"description":"Per-name conditions: { \"x-api-client\": { \"op\": \"exists\" } }."},"query":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"$ref":"#/components/schemas/TrafficRuleValue"},"description":"Per-name conditions: { \"x-api-client\": { \"op\": \"exists\" } }."},"extension":{"description":"Path extension, without the dot.","$ref":"#/components/schemas/TrafficRuleValue"},"ja3":{"$ref":"#/components/schemas/TrafficRuleValue"},"ja4":{"$ref":"#/components/schemas/TrafficRuleValue"}},"additionalProperties":false,"description":"Request attributes the rule looks at. At least one."},"TrafficRuleRoutingDefinition":{"type":"object","properties":{"source":{"type":"string","description":"The path the rule matches."},"destination":{"description":"Where a redirect sends the request.","type":"string"},"status":{"description":"The status a redirect answers with.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"headers":{"description":"The response header names a header rule sets or removes.","type":"array","items":{"type":"string"}},"force":{"description":"True when a redirect answers even if a published file can serve its source. Absent on a header rule.","type":"boolean"},"query":{"description":"The query parameters a redirect matches, each mapped to the capture name it fills. Absent when the rule matches on the path only.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"conditional":{"description":"True when the rule also matches on a country, a language, a cookie, or the user agent. Only a `_redirects` line can state those, so a rule with this flag cannot be written in the space settings.","type":"boolean"}},"required":["source"],"additionalProperties":false,"description":"A redirect or header rule: what it matches, and what it does."},"TrafficRuleDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space."},{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."},{"$ref":"#/components/schemas/TrafficRuleRoutingDefinition"}]},{"type":"null"}],"description":"The rule as its author wrote it. Null for a rule the edge still holds but the space no longer declares: the next reconcile removes it, and there is no authored rule left to show."},"TrafficRuleState":{"type":"object","properties":{"id":{"type":"string","description":"Spacefast's id for this rule."},"name":{"type":"string","description":"The rule's name at the edge, derived from what it does."},"handle":{"description":"The name the author gave the rule, or null when they gave it none.","type":["string","null"]},"kind":{"type":"string","enum":["firewall","cacheBypass","redirect","rewrite","header"],"description":"What the rule does."},"origin":{"type":"string","enum":["file","config","overlay","platform"],"description":"Where the rule was declared: `file` in the space's own source, `config` in the live version's config, `overlay` in the space settings, `platform` by Spacefast."},"sourceRef":{"description":"The config the rule was read from, for a rule a version declared.","type":["string","null"]},"placement":{"type":"string","enum":["edge","origin"],"description":"Where the rule runs. `edge` answers before the request reaches the space."},"placementReason":{"description":"Why the rule runs at the space instead of the edge, or null for a rule that runs at the edge. `placement_off`: this space does not run its rules at the edge, so nothing about the rule was judged. Every other code is an `edge_ineligible_*` one, and says what about the rule the edge could not carry. `edge_ineligible_capture`: the rule captures part of the path, or its destination uses a capture. `edge_ineligible_condition`: it matches on a request fact the edge would read differently from the space, such as a country, a cookie, a query string, or the user agent. `edge_ineligible_destination`: it sends the visitor to another origin. `edge_ineligible_status`: its redirect status is not 301, 302, 307, or 308. `edge_ineligible_shadowed`: a published file already answers that path and the rule is not forced. `edge_ineligible_order`: an earlier rule that stayed at the space could answer the same request first. `edge_ineligible_reentry`: it is a rewrite, and the space has to match its own rules against the rewritten path. `edge_ineligible_proxy`: it proxies to another origin. `edge_ineligible_not_found`: it answers 404. `edge_ineligible_path_preservation`: it is a whole-host redirect, and the edge cannot carry the path across. `edge_ineligible_platform_header`: it sets or removes a header the platform owns. `edge_ineligible_header_folds`: more than one rule sets the same header, and the space folds them where the edge would replace. `edge_ineligible_quota`: the space has more placeable rules than the edge holds.","type":["string","null"]},"desiredState":{"type":"string","enum":["enabled","disabled","suspended"],"description":"What the rule is meant to do. `suspended` is a paused space's parked rule."},"edgeState":{"type":"string","enum":["pending","live","invalid","over_quota","failed","unknown"],"description":"What the edge last said about the rule. `pending` means the edge accepted it and is still applying it; `over_quota` means the space has more rules than the edge allows and this one was left off."},"definition":{"$ref":"#/components/schemas/TrafficRuleDefinition"},"lastError":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false},{"type":"null"}],"description":"Why the edge refused the rule, or null."}},"required":["id","name","handle","kind","origin","sourceRef","placement","placementReason","desiredState","edgeState","definition","lastError"],"additionalProperties":false,"description":"One traffic rule, and what the edge last said about it."},"CollapsedTrafficRule":{"type":"object","properties":{"ruleName":{"type":"string","description":"The rule's name at the edge."},"origin":{"type":"string","enum":["file","config","overlay","platform"],"description":"Where the rule was declared: `file` in the space's own source, `config` in the live version's config, `overlay` in the space settings, `platform` by Spacefast."},"reason":{"type":"string","enum":["fingerprint","name"],"description":"`fingerprint`: an earlier rule already does the same thing. `name`: an earlier rule already has this name."}},"required":["ruleName","origin","reason"],"additionalProperties":false,"description":"A declared rule that an earlier rule already covers, so the edge never got it."},"TrafficRules":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/TrafficRuleState"},"description":"The space's rules, in the order the edge reads them."},"quota":{"anyOf":[{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rules this space currently has at the edge."},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Rules the edge allows this space. Null when the edge could not be read, because the allowance is the edge's to state and this platform does not know it."},"stale":{"type":"boolean","description":"True when the edge could not be reached, so these numbers are this platform's own record rather than the edge's answer."}},"required":["used","limit","stale"],"additionalProperties":false},{"type":"null"}],"description":"How many rules this space has at the edge and how many it may have. Null means the space has no edge yet, so there is no allowance to spend. `stale: false` is the edge's own answer; `stale: true` is our record of it, because the edge did not answer."},"paused":{"type":"boolean","description":"True while the space is paused. A paused space serves as if it declared none, and a rule it declares while paused is parked as it arrives."},"hostnames":{"type":"array","items":{"type":"string"},"description":"The hostnames these rules answer on."},"collapsed":{"type":"array","items":{"$ref":"#/components/schemas/CollapsedTrafficRule"},"description":"Rules the space declares that the edge never got, and why."}},"required":["rules","quota","paused","hostnames","collapsed"],"additionalProperties":false,"description":"A space's traffic rules and what the edge is doing with them."},"TrafficRuleIssue":{"type":"object","properties":{"path":{"type":"string","description":"Which rule and which field the problem is in, for example `firewall[0].match.country`."},"message":{"type":"string","description":"What is wrong, and what to write instead."}},"required":["path","message"],"additionalProperties":false,"description":"One problem with one rule."},"TrafficRuleCatalog":{"type":"object","properties":{"fields":{"type":"object","propertyNames":{"type":"string","enum":["path","host","method","ip","country","asn","userAgent","referer","header","cookie","query","extension","ja3","ja4"]},"additionalProperties":{"type":"object","properties":{"ops":{"type":"array","items":{"type":"string","enum":["eq","neq","in","inCidr","contains","startsWith","endsWith","wildcard","exists"],"description":"How the request attribute is compared to the value."},"description":"The comparisons this field makes."},"keyed":{"type":"boolean","description":"True when a condition on this field names what it looks at, like a header name."}},"required":["ops","keyed"],"additionalProperties":false},"required":["path","host","method","ip","country","asn","userAgent","referer","header","cookie","query","extension","ja3","ja4"],"description":"The request attributes a rule can match on."},"operators":{"type":"object","propertyNames":{"type":"string","enum":["eq","neq","in","inCidr","contains","startsWith","endsWith","wildcard","exists"],"description":"How the request attribute is compared to the value."},"additionalProperties":{"type":"string"},"required":["eq","neq","in","inCidr","contains","startsWith","endsWith","wildcard","exists"],"description":"Every comparison, and what it does."},"limits":{"type":"object","properties":{"rulesPerSpace":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rules one space may declare, per list."},"conditionsPerRule":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Comparisons one cache-bypass rule may make."},"firewallConditionsPerRule":{"description":"Comparisons one firewall rule may make.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"valuesPerCondition":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Values one `in` or `inCidr` may list."},"valueCharacters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Characters one value may have."},"descriptionCharacters":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Characters a rule's description may have."}},"required":["rulesPerSpace","conditionsPerRule","valuesPerCondition","valueCharacters","descriptionCharacters"],"additionalProperties":false,"description":"What the platform accepts. The edge may allow fewer rules than a space may declare."}},"required":["fields","operators","limits"],"additionalProperties":false,"description":"What a traffic rule may match on, compare with, and how large it may be."}}},"tags":[{"name":"Spaces","description":"Create, transfer, and manage spaces."},{"name":"Publishing","description":"Publish files in one call, then claim the space that came back."},{"name":"Agent","description":"What an agent may do: scoped context, approvals, and resuming a paused action."},{"name":"Git","description":"Connected repositories: files, commits, diffs, branches, and syncs."},{"name":"Builds","description":"Remote source execution, build logs, retries, and cancellation."},{"name":"Versions","description":"Version lifecycle: upload, finalize, promote, and inspect."},{"name":"Domains","description":"Space hostnames and optional domain registration and DNS management."},{"name":"Access","description":"Who can open a space: grants, share links, people, passwords, machine credentials, and access requests."},{"name":"Variables","description":"Space and team variables resolved at publish time."},{"name":"Connectors","description":"Services a team connected, the tools they expose, what policy allows, and the runs and artifacts built on them."},{"name":"Runtime","description":"What a space runs: runtime status, deployed shape, and realtime replay."},{"name":"Database","description":"The database a space's runtime owns: schema, rows, migrations, and console."},{"name":"Tags","description":"Tag manager templates, drafts, releases, and preview sessions."},{"name":"Activity","description":"Activity feed, logs, analytics, webhooks, and operations."},{"name":"Teams","description":"Team membership, settings, usage, and entitlements."},{"name":"Account","description":"Identity, API keys, device login, and event intake."},{"name":"Docs","description":"Machine-readable documentation index: guides, CLI, API reference, and recipes."}],"paths":{"/v1/spaces":{"get":{"operationId":"listSpaces","summary":"List spaces","description":"Returns the spaces your credential can access, newest-first. Filter by team or external principal to narrow the list.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"query","in":"query","required":false,"schema":{"description":"Match a literal substring in the Space title, slug, or ID, without case sensitivity. Empty text returns all accessible Spaces.","type":"string","maxLength":200}},{"name":"principal","in":"query","required":false,"schema":{"description":"Filter that limits results to spaces owned by this external principal.","type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$"}},{"name":"team","in":"query","required":false,"schema":{"description":"Filter that limits results to spaces owned by this team id or slug.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","tenantId":"ten_main","providerRef":null,"providerClientId":null,"teamId":"team_3f9a1c7e5b2d8a4f","teamSlug":"acme","principal":{"tenantId":"ten_main","principalType":"team","principalId":"team_3f9a1c7e5b2d8a4f"},"anonymous":false,"slug":"marketing-site","title":"Marketing site","status":"active","disabled":null,"claimState":null,"defaultHostname":"marketing-site.space.fast","publicName":"marketing-site","liveUrl":"https://marketing-site.space.fast/","dataLocation":"dca","channels":{"live":{"versionId":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","updatedAt":"2026-06-30T12:00:03.000Z"}},"config":null,"noindex":false,"teamAccessPolicy":{"privateSpacesOnly":false,"noindex":false},"policy":null,"operation":null,"createdAt":"2026-06-30T11:59:00.000Z","updatedAt":"2026-06-30T12:00:03.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"post":{"operationId":"createSpace","summary":"Create a space","description":"Creates a space under a team with a chosen or generated slug. Pass `source` to create it from a GitHub repository and start its first build. Use POST /v1/publish to create a space and publish content in one call.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"teamId":{"type":["string","null"]},"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Owning principal kind."},"id":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["type","id"]},"slug":{"type":"string","minLength":2,"maxLength":55},"title":{"type":"string","minLength":1,"maxLength":255},"config":{"description":"Initial SpaceConfig overlay for the new space.","type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},"access":{"description":"Set the initial root access for this new team-owned Space. Omit this field to use the team's default. `public` returns 403 `team_private_spaces_only` when the team allows private spaces only.","type":"string","enum":["private","team","public"]},"dataLocation":{"description":"Data location for a new Space; \"auto\" lets placement decide.","type":"string"},"source":{"description":"Create from an authorized GitHub repository or fork the main branch of a Source available Spacefast repository. GitHub connections start their initial sync and deployment; remixes copy main and publish an initial live build. Team-owned Spaces only.","oneOf":[{"type":"object","properties":{"provider":{"type":"string","const":"github"},"installationId":{"type":"string","minLength":1,"description":"GitHub App installation that holds the repository."},"repositoryId":{"type":"string","minLength":1,"description":"Immutable GitHub repository id."},"repositoryFullName":{"type":"string","minLength":3,"description":"The repository as owner/name."},"branch":{"description":"Production branch. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["provider","installationId","repositoryId","repositoryFullName"]},{"type":"object","properties":{"provider":{"type":"string","const":"spacefast_fork"},"url":{"type":"string","format":"uri","description":"Spacefast source URL or dashboard remix link. Forks main into an independent repository, then builds and publishes the copy."}},"required":["provider","url"],"additionalProperties":false}]}}},"example":{"teamId":"team_3f9a1c7e5b2d8a4f","slug":"marketing-site","title":"Marketing site"}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"teamId":{"type":["string","null"]},"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Owning principal kind."},"id":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["type","id"]},"slug":{"type":"string","minLength":2,"maxLength":55},"title":{"type":"string","minLength":1,"maxLength":255},"config":{"description":"Initial SpaceConfig overlay for the new space.","type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},"access":{"description":"Set the initial root access for this new team-owned Space. Omit this field to use the team's default. `public` returns 403 `team_private_spaces_only` when the team allows private spaces only.","type":"string","enum":["private","team","public"]},"dataLocation":{"description":"Data location for a new Space; \"auto\" lets placement decide.","type":"string"},"source":{"description":"Create from an authorized GitHub repository or fork the main branch of a Source available Spacefast repository. GitHub connections start their initial sync and deployment; remixes copy main and publish an initial live build. Team-owned Spaces only.","oneOf":[{"type":"object","properties":{"provider":{"type":"string","const":"github"},"installationId":{"type":"string","minLength":1,"description":"GitHub App installation that holds the repository."},"repositoryId":{"type":"string","minLength":1,"description":"Immutable GitHub repository id."},"repositoryFullName":{"type":"string","minLength":3,"description":"The repository as owner/name."},"branch":{"description":"Production branch. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["provider","installationId","repositoryId","repositoryFullName"]},{"type":"object","properties":{"provider":{"type":"string","const":"spacefast_fork"},"url":{"type":"string","format":"uri","description":"Spacefast source URL or dashboard remix link. Forks main into an independent repository, then builds and publishes the copy."}},"required":["provider","url"],"additionalProperties":false}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"teamId":{"type":["string","null"]},"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Owning principal kind."},"id":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["type","id"]},"slug":{"type":"string","minLength":2,"maxLength":55},"title":{"type":"string","minLength":1,"maxLength":255},"config":{"description":"Initial SpaceConfig overlay for the new space.","type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},"access":{"description":"Set the initial root access for this new team-owned Space. Omit this field to use the team's default. `public` returns 403 `team_private_spaces_only` when the team allows private spaces only.","type":"string","enum":["private","team","public"]},"dataLocation":{"description":"Data location for a new Space; \"auto\" lets placement decide.","type":"string"},"source":{"description":"Create from an authorized GitHub repository or fork the main branch of a Source available Spacefast repository. GitHub connections start their initial sync and deployment; remixes copy main and publish an initial live build. Team-owned Spaces only.","oneOf":[{"type":"object","properties":{"provider":{"type":"string","const":"github"},"installationId":{"type":"string","minLength":1,"description":"GitHub App installation that holds the repository."},"repositoryId":{"type":"string","minLength":1,"description":"Immutable GitHub repository id."},"repositoryFullName":{"type":"string","minLength":3,"description":"The repository as owner/name."},"branch":{"description":"Production branch. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["provider","installationId","repositoryId","repositoryFullName"]},{"type":"object","properties":{"provider":{"type":"string","const":"spacefast_fork"},"url":{"type":"string","format":"uri","description":"Spacefast source URL or dashboard remix link. Forks main into an independent repository, then builds and publishes the copy."}},"required":["provider","url"],"additionalProperties":false}]}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false},"access":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":16,"maxLength":512},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["url","token","expiresAt"],"additionalProperties":false},"claim":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately."},"url":{"type":"string","format":"uri","description":"The site door: the live URL with the space key in /__/ form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key."},"claimUrl":{"type":"string","format":"uri","description":"Claim page link in /claim# form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once."},"expiresAt":{"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":["key","url","claimUrl","expiresAt"],"additionalProperties":false}},"required":["space","access"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"space":{"id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","tenantId":"ten_main","providerRef":null,"providerClientId":null,"teamId":"team_3f9a1c7e5b2d8a4f","teamSlug":"acme","principal":{"tenantId":"ten_main","principalType":"team","principalId":"team_3f9a1c7e5b2d8a4f"},"anonymous":false,"slug":"marketing-site","title":"Marketing site","status":"active","disabled":null,"claimState":null,"defaultHostname":"marketing-site.space.fast","publicName":"marketing-site","liveUrl":"https://marketing-site.space.fast/","dataLocation":"dca","channels":{"live":{"versionId":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","updatedAt":"2026-06-30T12:00:03.000Z"}},"config":null,"noindex":false,"teamAccessPolicy":{"privateSpacesOnly":false,"noindex":false},"policy":null,"operation":null,"createdAt":"2026-06-30T11:59:00.000Z","updatedAt":"2026-06-30T12:00:03.000Z"}}}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}":{"get":{"operationId":"getSpace","summary":"Get a space","description":"Returns one space with its status, URLs, channels, and policy. Accepts a `spc_` id or a slug; a slug that matches spaces in more than one of your teams fails with `ambiguous_space_slug`.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"description":"Space id (`spc_…`) or slug.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"patch":{"operationId":"updateSpace","summary":"Update a space","description":"Updates the space title, serving configuration, placement, or slug. A slug rename must be sent by itself and moves the managed hostname within its apex.","security":[{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"slug":{"description":"Renames the space and its managed hostname. The hostname keeps its apex (space.fast, or view.fast for older spaces). Send slug by itself. Previously managed hostnames keep a temporary 307 redirect that preserves path and query to the current hostname. Immutable version URLs do not change.","type":"string","minLength":2,"maxLength":55},"config":{"description":"Replaces the stored SpaceConfig overlay; null clears it.","anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},{"type":"null"}]},"baseSettingsDigest":{"description":"Optimistic-concurrency base for versioned settings (title and config): the `settingsDigest` read from the Space resource when the form loaded. If provided and the space's current settings digest no longer matches, the PATCH fails with 409 `publish_base_changed` and changes nothing.","type":"string","pattern":"^[0-9a-f]{64}$"},"force":{"description":"With `baseSettingsDigest`, acknowledge a changed base and overwrite anyway. The server records the forced overwrite in the space activity feed. This is never the default.","type":"boolean"},"dataLocation":{"type":"string","minLength":1},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"noindex":{"description":"Hide the live production site from search engines. This applies only to live hostnames of claimed spaces. Preview and version hostnames are always noindex. `false` returns 403 `team_requires_noindex` while the owning team hides every space from search engines.","type":"boolean"},"pinned":{"description":"Pin the space to the top of its team's space list, for everyone on the team. This is presentation only: it never changes what the space serves.","type":"boolean"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"slug":{"description":"Renames the space and its managed hostname. The hostname keeps its apex (space.fast, or view.fast for older spaces). Send slug by itself. Previously managed hostnames keep a temporary 307 redirect that preserves path and query to the current hostname. Immutable version URLs do not change.","type":"string","minLength":2,"maxLength":55},"config":{"description":"Replaces the stored SpaceConfig overlay; null clears it.","anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},{"type":"null"}]},"baseSettingsDigest":{"description":"Optimistic-concurrency base for versioned settings (title and config): the `settingsDigest` read from the Space resource when the form loaded. If provided and the space's current settings digest no longer matches, the PATCH fails with 409 `publish_base_changed` and changes nothing.","type":"string","pattern":"^[0-9a-f]{64}$"},"force":{"description":"With `baseSettingsDigest`, acknowledge a changed base and overwrite anyway. The server records the forced overwrite in the space activity feed. This is never the default.","type":"boolean"},"dataLocation":{"type":"string","minLength":1},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"noindex":{"description":"Hide the live production site from search engines. This applies only to live hostnames of claimed spaces. Preview and version hostnames are always noindex. `false` returns 403 `team_requires_noindex` while the owning team hides every space from search engines.","type":"boolean"},"pinned":{"description":"Pin the space to the top of its team's space list, for everyone on the team. This is presentation only: it never changes what the space serves.","type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"slug":{"description":"Renames the space and its managed hostname. The hostname keeps its apex (space.fast, or view.fast for older spaces). Send slug by itself. Previously managed hostnames keep a temporary 307 redirect that preserves path and query to the current hostname. Immutable version URLs do not change.","type":"string","minLength":2,"maxLength":55},"config":{"description":"Replaces the stored SpaceConfig overlay; null clears it.","anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},{"type":"null"}]},"baseSettingsDigest":{"description":"Optimistic-concurrency base for versioned settings (title and config): the `settingsDigest` read from the Space resource when the form loaded. If provided and the space's current settings digest no longer matches, the PATCH fails with 409 `publish_base_changed` and changes nothing.","type":"string","pattern":"^[0-9a-f]{64}$"},"force":{"description":"With `baseSettingsDigest`, acknowledge a changed base and overwrite anyway. The server records the forced overwrite in the space activity feed. This is never the default.","type":"boolean"},"dataLocation":{"type":"string","minLength":1},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"noindex":{"description":"Hide the live production site from search engines. This applies only to live hostnames of claimed spaces. Preview and version hostnames are always noindex. `false` returns 403 `team_requires_noindex` while the owning team hides every space from search engines.","type":"boolean"},"pinned":{"description":"Pin the space to the top of its team's space list, for everyone on the team. This is presentation only: it never changes what the space serves.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"delete":{"operationId":"deleteSpace","summary":"Delete a space","description":"Stops serving immediately and retains the space's provider site, versions, and data for operator cleanup. Agent grants without the delete scope receive a temporary-access approval link. A superadmin can purge the retained data later.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:delete"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/usage":{"get":{"operationId":"getSpaceUsage","summary":"Get a space's usage","description":"Returns what this space consumed — storage, compute, bandwidth, email, and function invocations — over the most recent settled measurement period. These numbers are measured by the infrastructure that serves the space, not derived from what was published, and they lag: the response carries the exact period it describes and when it was read, and nothing in it means \"right now\".","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space the usage was measured for."},"usage":{"anyOf":[{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","description":"First instant of the measured period."},"end":{"type":"string","description":"Last instant of the measured period. The numbers are current as of here."},"resolution":{"type":"string","enum":["hour","day","month"],"description":"Length of the measured period."}},"required":["start","end","resolution"],"additionalProperties":false,"description":"The window these numbers describe."},"sampledAt":{"type":"string","description":"When the platform last read this space's usage from the serving infrastructure."},"storageBytes":{"type":"number","description":"Average bytes of disk the space occupied during the period. This is what storage is billed on: bytes actually on disk, not the size of what was uploaded."},"computeSeconds":{"type":"number","description":"Seconds of compute the space consumed during the period."},"bandwidthBytes":{"type":"number","description":"Bytes the space served during the period."},"emailCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Emails the space sent during the period."},"functionInvocations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Function invocations during the period, counted where the space is known. Best-effort: counts are pushed after each request completes and may arrive late."},"functionErrors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Function invocations during the period that ended in an error."}},"required":["period","sampledAt","storageBytes","computeSeconds","bandwidthBytes","emailCount","functionInvocations","functionErrors"],"additionalProperties":false},{"type":"null"}],"description":"Null when this space has never been measured, either because it has not served yet or because its first measurement period has not settled."}},"required":["spaceId","usage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/archive":{"post":{"operationId":"archiveSpace","summary":"Archive a space","description":"Stops serving while keeping the space visible to its owner and retaining its versions, source, database, storage, and domains. Restore it to resume serving.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/restore":{"post":{"operationId":"restoreSpace","summary":"Restore an archived space","description":"Restores an archived space with its original versions, data, and URLs.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/space-transfers":{"get":{"operationId":"listSpaceTransfers","summary":"List a team's space transfers","description":"Returns the team's transfers in both directions, newest-first, annotated `outgoing` or `incoming` and carrying a space summary the receiving side can render before accepting. Pending transfers only unless a status filter says otherwise; at most the newest 100 return.","security":[{"bearerAuth":[]}],"parameters":[{"name":"team","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Team id or slug whose transfers to list. The caller must hold transfer authority on it."}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Filter to transfers of one space (`spc_`).","type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"description":"Filter by transfer state. Omitted, only `pending_confirmation` transfers return.","type":"string","enum":["pending_confirmation","completed","canceled","expired"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"SpaceTransfer id (`trf_`)."},"spaceId":{"type":"string","description":"Space being transferred."},"from":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Current owner. Keeps full control, serving, and billing attribution until `completed`."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Receiving principal. Accept is a to-side action."},"status":{"type":"string","enum":["pending_confirmation","completed","canceled","expired"],"description":"Transfer state. Accepting moves ownership in one transaction, so a transfer is either still `pending_confirmation` or already terminal."},"expiresAt":{"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))$","description":"Instant when a pending transfer expires (default 7 days)."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"direction":{"type":"string","enum":["outgoing","incoming"],"description":"Whether the queried team is sending (`outgoing`) or receiving (`incoming`)."},"space":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"}},"required":["id","slug","title"],"additionalProperties":false,"description":"Summary of the space under transfer."},"fromDisplayName":{"description":"Sending team's name; null when the sender is an external principal.","type":["string","null"]},"toDisplayName":{"description":"Receiving team's name; null when the receiver is an external principal.","type":["string","null"]}},"required":["id","spaceId","from","to","status","expiresAt","createdAt","updatedAt","direction","space","fromDisplayName","toDisplayName"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"post":{"operationId":"createSpaceTransfer","summary":"Request a space transfer","description":"Starts a tenant-local ownership transfer to another principal. The transfer completes at once when the caller can accept for the receiving team, or can create spaces there and the space has no custom domain, database, or paid resource. Otherwise the current owner keeps full control until the receiving side accepts.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to transfer (`spc_`)."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["principalType","principalId"],"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["spaceId","to"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to transfer (`spc_`)."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["principalType","principalId"],"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["spaceId","to"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to transfer (`spc_`)."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["principalType","principalId"],"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["spaceId","to"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"SpaceTransfer id (`trf_`)."},"spaceId":{"type":"string","description":"Space being transferred."},"from":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Current owner. Keeps full control, serving, and billing attribution until `completed`."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Receiving principal. Accept is a to-side action."},"status":{"type":"string","enum":["pending_confirmation","completed","canceled","expired"],"description":"Transfer state. Accepting moves ownership in one transaction, so a transfer is either still `pending_confirmation` or already terminal."},"expiresAt":{"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))$","description":"Instant when a pending transfer expires (default 7 days)."},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","from","to","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/space-transfers/{transferId}":{"get":{"operationId":"getSpaceTransfer","summary":"Get a space transfer","description":"Returns one transfer's parties, status, and expiry. Both the sending and the receiving side can read it; nobody else can.","security":[{"bearerAuth":[]}],"parameters":[{"name":"transferId","in":"path","required":true,"schema":{"description":"SpaceTransfer id (`trf_`).","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"SpaceTransfer id (`trf_`)."},"spaceId":{"type":"string","description":"Space being transferred."},"from":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Current owner. Keeps full control, serving, and billing attribution until `completed`."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Receiving principal. Accept is a to-side action."},"status":{"type":"string","enum":["pending_confirmation","completed","canceled","expired"],"description":"Transfer state. Accepting moves ownership in one transaction, so a transfer is either still `pending_confirmation` or already terminal."},"expiresAt":{"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))$","description":"Instant when a pending transfer expires (default 7 days)."},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","from","to","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"delete":{"operationId":"cancelSpaceTransfer","summary":"Cancel a space transfer","description":"Ends a pending transfer. The sending side withdraws, and the receiving side declines. Both outcomes are `canceled`. You can cancel until the receiving side accepts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"transferId","in":"path","required":true,"schema":{"description":"SpaceTransfer id (`trf_`).","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"SpaceTransfer id (`trf_`)."},"spaceId":{"type":"string","description":"Space being transferred."},"from":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Current owner. Keeps full control, serving, and billing attribution until `completed`."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Receiving principal. Accept is a to-side action."},"status":{"type":"string","enum":["pending_confirmation","completed","canceled","expired"],"description":"Transfer state. Accepting moves ownership in one transaction, so a transfer is either still `pending_confirmation` or already terminal."},"expiresAt":{"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))$","description":"Instant when a pending transfer expires (default 7 days)."},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","from","to","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/space-transfers/{transferId}/accept":{"post":{"operationId":"acceptSpaceTransfer","summary":"Accept a space transfer","description":"Accepts a transfer from the receiving side. Ownership moves immediately: the space keeps serving from where it already is, and the previous owner's space-scoped credentials stop working.","security":[{"bearerAuth":[]}],"parameters":[{"name":"transferId","in":"path","required":true,"schema":{"description":"SpaceTransfer id (`trf_`).","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"SpaceTransfer id (`trf_`)."},"spaceId":{"type":"string","description":"Space being transferred."},"from":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Current owner. Keeps full control, serving, and billing attribution until `completed`."},"to":{"type":"object","properties":{"principalType":{"type":"string","enum":["team","external"],"description":"Receiving principal kind: a first-party team or a host-managed external principal."},"principalId":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."},"tenantId":{"type":"string","minLength":1,"description":"Tenant both transfer parties live in."}},"required":["principalType","principalId","tenantId"],"additionalProperties":false,"description":"Receiving principal. Accept is a to-side action."},"status":{"type":"string","enum":["pending_confirmation","completed","canceled","expired"],"description":"Transfer state. Accepting moves ownership in one transaction, so a transfer is either still `pending_confirmation` or already terminal."},"expiresAt":{"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))$","description":"Instant when a pending transfer expires (default 7 days)."},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","from","to","status","expiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/teams":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listTeams","summary":"List teams","description":"Returns the teams your credential can act for, newest-first.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"createTeam","summary":"Create a team","description":"Creates a new team owned by your credential's user. Self-serve teams are created in the main tenant and the caller becomes the team owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name for the new team."},"slug":{"description":"Optional URL slug. If omitted, the server generates the lowest available slug.","type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"parentTeamId":{"description":"Create a subteam of this Enterprise team. Requires owner or admin on that team.","type":"string","minLength":1}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name for the new team."},"slug":{"description":"Optional URL slug. If omitted, the server generates the lowest available slug.","type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"parentTeamId":{"description":"Create a subteam of this Enterprise team. Requires owner or admin on that team.","type":"string","minLength":1}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Display name for the new team."},"slug":{"description":"Optional URL slug. If omitted, the server generates the lowest available slug.","type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"parentTeamId":{"description":"Create a subteam of this Enterprise team. Requires owner or admin on that team.","type":"string","minLength":1}},"required":["name"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"logo":{"description":"Optional team logo URL.","type":["string","null"]},"metadata":{"description":"Opaque team metadata stored by the client.","type":["string","null"]},"stripeCustomerId":{"description":"Stripe customer id linked to this team; null until billing is initialized.","type":["string","null"]},"systemSpaceId":{"description":"The space that supplies this team's page, theme, and presentation defaults.","type":["string","null"]},"manifestStatus":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The manifest key this item materializes."},"state":{"type":"string","enum":["pending","active","failed"],"description":"Where the last reconcile landed this key."},"detail":{"description":"Human-readable reason, present when the state warrants one (typically `failed`).","type":"string"},"since":{"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))$","description":"When this key last CHANGED state — stable across no-op re-runs, so it reads as ` since …`."},"challenge":{"description":"Sign this challenge with every new issuer key, using the supplied audience, then republish proofs. Existing active keys remain usable while rotation is pending.","type":"string"},"audience":{"description":"`tokenIssuers` only: the server-minted opaque audience for the issuer this key materialized. Not a secret — it rides in every partner token's `aud` claim and is verified server-side — and the partner needs it to sign the activation proof and to mint tokens, so it is served here rather than handed over out of band.","type":"string"}},"required":["key","state","since"],"additionalProperties":false},"description":"Per-key materialization status."},"sourceVersionId":{"description":"The system space's live version every item was converged from, or null when nothing is materialized.","type":["string","null"]}},"required":["items","sourceVersionId"],"additionalProperties":false,"description":"The status of the restricted manifest from the team's system space."},"presentation":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"logo":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"supportUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"claimOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"accessHandoffOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"problemDocsBaseUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"contacts":{"description":"Named contact URLs or addresses shown to claimants and partners.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false,"description":"Partner-facing branding and links for the white-label surface."},{"type":"null"}],"description":"The presentation from the team's system space, or null when no value is active."}},"required":["id","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId","systemSpaceId","manifestStatus","presentation"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeam","summary":"Get a team","description":"Returns one team with its plan, slug, and default data location.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"logo":{"description":"Optional team logo URL.","type":["string","null"]},"metadata":{"description":"Opaque team metadata stored by the client.","type":["string","null"]},"stripeCustomerId":{"description":"Stripe customer id linked to this team; null until billing is initialized.","type":["string","null"]},"systemSpaceId":{"description":"The space that supplies this team's page, theme, and presentation defaults.","type":["string","null"]},"manifestStatus":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The manifest key this item materializes."},"state":{"type":"string","enum":["pending","active","failed"],"description":"Where the last reconcile landed this key."},"detail":{"description":"Human-readable reason, present when the state warrants one (typically `failed`).","type":"string"},"since":{"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))$","description":"When this key last CHANGED state — stable across no-op re-runs, so it reads as ` since …`."},"challenge":{"description":"Sign this challenge with every new issuer key, using the supplied audience, then republish proofs. Existing active keys remain usable while rotation is pending.","type":"string"},"audience":{"description":"`tokenIssuers` only: the server-minted opaque audience for the issuer this key materialized. Not a secret — it rides in every partner token's `aud` claim and is verified server-side — and the partner needs it to sign the activation proof and to mint tokens, so it is served here rather than handed over out of band.","type":"string"}},"required":["key","state","since"],"additionalProperties":false},"description":"Per-key materialization status."},"sourceVersionId":{"description":"The system space's live version every item was converged from, or null when nothing is materialized.","type":["string","null"]}},"required":["items","sourceVersionId"],"additionalProperties":false,"description":"The status of the restricted manifest from the team's system space."},"presentation":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"logo":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"supportUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"claimOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"accessHandoffOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"problemDocsBaseUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"contacts":{"description":"Named contact URLs or addresses shown to claimants and partners.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false,"description":"Partner-facing branding and links for the white-label surface."},{"type":"null"}],"description":"The presentation from the team's system space, or null when no value is active."}},"required":["id","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId","systemSpaceId","manifestStatus","presentation"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"updateTeam","summary":"Update a team","description":"Updates team settings. The request can also set the system space that supplies team defaults.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"logo":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"metadata":{"type":["string","null"]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"systemSpaceId":{"description":"Set the team's system space. Use null to clear the current system space.","type":["string","null"]},"baseSystemSpaceId":{"description":"The current system-space id that the caller expects. The update fails if this value is stale.","type":["string","null"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"logo":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"metadata":{"type":["string","null"]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"systemSpaceId":{"description":"Set the team's system space. Use null to clear the current system space.","type":["string","null"]},"baseSystemSpaceId":{"description":"The current system-space id that the caller expects. The update fails if this value is stale.","type":["string","null"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$"},"logo":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"metadata":{"type":["string","null"]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"systemSpaceId":{"description":"Set the team's system space. Use null to clear the current system space.","type":["string","null"]},"baseSystemSpaceId":{"description":"The current system-space id that the caller expects. The update fails if this value is stale.","type":["string","null"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"logo":{"description":"Optional team logo URL.","type":["string","null"]},"metadata":{"description":"Opaque team metadata stored by the client.","type":["string","null"]},"stripeCustomerId":{"description":"Stripe customer id linked to this team; null until billing is initialized.","type":["string","null"]},"systemSpaceId":{"description":"The space that supplies this team's page, theme, and presentation defaults.","type":["string","null"]},"manifestStatus":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The manifest key this item materializes."},"state":{"type":"string","enum":["pending","active","failed"],"description":"Where the last reconcile landed this key."},"detail":{"description":"Human-readable reason, present when the state warrants one (typically `failed`).","type":"string"},"since":{"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))$","description":"When this key last CHANGED state — stable across no-op re-runs, so it reads as ` since …`."},"challenge":{"description":"Sign this challenge with every new issuer key, using the supplied audience, then republish proofs. Existing active keys remain usable while rotation is pending.","type":"string"},"audience":{"description":"`tokenIssuers` only: the server-minted opaque audience for the issuer this key materialized. Not a secret — it rides in every partner token's `aud` claim and is verified server-side — and the partner needs it to sign the activation proof and to mint tokens, so it is served here rather than handed over out of band.","type":"string"}},"required":["key","state","since"],"additionalProperties":false},"description":"Per-key materialization status."},"sourceVersionId":{"description":"The system space's live version every item was converged from, or null when nothing is materialized.","type":["string","null"]}},"required":["items","sourceVersionId"],"additionalProperties":false,"description":"The status of the restricted manifest from the team's system space."},"presentation":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"logo":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"supportUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"claimOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"accessHandoffOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"problemDocsBaseUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"contacts":{"description":"Named contact URLs or addresses shown to claimants and partners.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false,"description":"Partner-facing branding and links for the white-label surface."},{"type":"null"}],"description":"The presentation from the team's system space, or null when no value is active."}},"required":["id","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId","systemSpaceId","manifestStatus","presentation"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"deleteTeam","summary":"Delete a team","description":"Deletes a team and its memberships, invitations, and team credentials with a soft-delete marker. Team administrators can restore it for 30 days.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"deletedAt":{"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))$"},"restorableUntil":{"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","slug","deletedAt","restorableUntil"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/restore":{"post":{"security":[{"sessionCookie":[]}],"operationId":"restoreTeam","summary":"Restore a team","description":"Restores a soft-deleted team and its cascaded memberships, invitations, and credentials within the 30-day restore window.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/members":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamMembers","summary":"List team members","description":"Returns the team's members with their roles, newest-first.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The membership id, stable for the life of the membership."},"teamId":{"type":"string","description":"The team this membership belongs to."},"userId":{"type":"string","description":"The member's user id."},"role":{"type":"string","enum":["owner","admin","member"],"description":"The member's role on the team."},"via":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"createdAt":{"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))$","description":"Instant the member joined the team."},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The member's user id."},"name":{"type":"string","description":"The member's display name."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The member's email address."},"image":{"description":"Avatar URL, or null when the user has none.","type":["string","null"]}},"required":["id","name","email","image"],"additionalProperties":false},{"type":"null"}],"description":"The member's user record; null when the user row is unavailable."}},"required":["id","teamId","userId","role","via","createdAt","user"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/members/{memberId}":{"patch":{"security":[{"bearerAuth":[]}],"operationId":"updateTeamMemberRole","summary":"Change a team member's role","description":"Changes a member's role by member id or user email. Only an owner can grant the owner role, and the last owner's role cannot be changed until another owner exists.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"The role to grant this member."}},"required":["role"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"The role to grant this member."}},"required":["role"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"The role to grant this member."}},"required":["role"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"The membership id, stable for the life of the membership."},"teamId":{"type":"string","description":"The team this membership belongs to."},"userId":{"type":"string","description":"The member's user id."},"role":{"type":"string","enum":["owner","admin","member"],"description":"The member's role on the team."},"via":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"createdAt":{"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))$","description":"Instant the member joined the team."},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The member's user id."},"name":{"type":"string","description":"The member's display name."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The member's email address."},"image":{"description":"Avatar URL, or null when the user has none.","type":["string","null"]}},"required":["id","name","email","image"],"additionalProperties":false},{"type":"null"}],"description":"The member's user record; null when the user row is unavailable."}},"required":["id","teamId","userId","role","via","createdAt","user"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"security":[{"bearerAuth":[]}],"operationId":"removeTeamMember","summary":"Remove a team member","description":"Removes a member by member id or user email. The last owner of a team cannot be removed.","responses":{"204":{"description":"The member was removed."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"memberId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/team-invitations":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamInvitations","summary":"List team invitations","description":"Returns the team's invitations and their statuses, newest-first.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"teamId","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The team whose invitations to list."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["pending","accepted","rejected","canceled","expired"]},"expiresAt":{"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))$"},"createdAt":{"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","teamId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"createTeamInvitation","summary":"Invite someone to a team","description":"Creates a pending invitation and emails the invitee a join link.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"The team to invite this person to."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["teamId","email"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"The team to invite this person to."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["teamId","email"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"The team to invite this person to."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["teamId","email"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["pending","accepted","rejected","canceled","expired"]},"expiresAt":{"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))$"},"createdAt":{"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","teamId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/team-invitations/{invitationId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getTeamInvitation","summary":"Get a team invitation","description":"Returns the inviting team's name, the masked invitee address, and whether the invitation can still be accepted.","parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The invitation id (the token from the invite link)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Invitation id."},"teamName":{"type":"string","description":"Inviting team's display name."},"email":{"type":"string","description":"The invited address, masked (`ja****@example.com`); never the full address."},"status":{"type":"string","enum":["pending","accepted","rejected","canceled","expired"],"description":"Current state of the invitation. Only `pending` can be accepted."},"expiresAt":{"type":"string","description":"Instant when the invitation expires."},"requiresTwoFactor":{"type":"boolean","description":"Whether the team requires two-factor authentication. Accepting needs an account with two-factor on."}},"required":["id","teamName","email","status","expiresAt","requiresTwoFactor"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"security":[{"bearerAuth":[]}],"operationId":"revokeTeamInvitation","summary":"Revoke a team invitation","description":"Cancels a pending invitation so its join link stops working.","responses":{"204":{"description":"The invitation was revoked."}},"parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The invitation id (the token from the invite link)."}}],"tags":["Teams"]}},"/v1/team-invitations/{invitationId}/resend":{"post":{"security":[{"bearerAuth":[]}],"operationId":"resendTeamInvitation","summary":"Resend a team invitation","description":"Extends a pending invitation expiration and emails the join link again.","parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The invitation id (the token from the invite link)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["owner","admin","member"]},"status":{"type":"string","enum":["pending","accepted","rejected","canceled","expired"]},"expiresAt":{"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))$"},"createdAt":{"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","teamId","email","role","status","expiresAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/team-invitations/{invitationId}/accept":{"post":{"security":[{"bearerAuth":[]}],"operationId":"acceptTeamInvitation","summary":"Accept a team invitation","description":"Accepts a pending team invitation by its id for the calling user. Adds the caller to the team with the invited role. The invitation must be pending, unexpired, and addressed to the caller's email. Each invitation is single-use. Requires a user principal; machine and team-scoped credentials cannot accept invitations.","parameters":[{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"The invitation id (the token from the invite link)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"teamId":{"type":"string","description":"The id of the team the caller joined."},"teamSlug":{"type":"string","description":"URL-safe slug of the joined team."},"userId":{"type":"string","description":"The id of the user that accepted the invitation."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Role granted by the invitation."}},"required":["teamId","teamSlug","userId","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/subteams":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listSubTeams","summary":"List subteams","description":"Lists the subteams of an Enterprise team. Every member of the team can see them.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string"},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","slug","memberCount","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"createSubTeam","summary":"Create a subteam","description":"Creates a subteam, a team inside this team that it bills. Requires an Enterprise team and a team owner or admin. The team's owners and admins become the subteam's owners and admins.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string"},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","slug","memberCount","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/subteams/{subTeamId}":{"patch":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"updateSubTeam","summary":"Rename a subteam","description":"Renames a subteam. Requires an Enterprise team and a team owner or admin.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"subTeamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255}},"required":["name"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":255},"slug":{"type":"string"},"memberCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","slug","memberCount","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"deleteSubTeam","summary":"Delete a subteam","description":"Deletes a subteam and its memberships. Requires an Enterprise team and a team owner or admin. Delete or transfer the subteam's Spaces first.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"subTeamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/subteams/{subTeamId}/members":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listSubTeamMembers","summary":"List subteam members","description":"Lists the members of an Enterprise subteam. The subteam's members and the team's owners and admins can read it.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"subTeamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subTeamId":{"type":"string"},"userId":{"type":"string"},"createdAt":{"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))$"},"user":{"type":"object","properties":{"id":{"type":"string","description":"The member's user id."},"name":{"type":"string","description":"The member's display name."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The member's email address."},"image":{"description":"Avatar URL, or null when the user has none.","type":["string","null"]}},"required":["id","name","email","image"],"additionalProperties":false}},"required":["id","subTeamId","userId","createdAt","user"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"addSubTeamMember","summary":"Add a subteam member","description":"Adds an existing Enterprise team member to the subteam. No invitation and no new seat. Repeating the same request keeps one membership.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"subTeamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userId":{"type":"string","minLength":1}},"required":["userId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"subTeamId":{"type":"string"},"userId":{"type":"string"}},"required":["subTeamId","userId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/subteams/{subTeamId}/members/{userId}":{"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"removeSubTeamMember","summary":"Remove a subteam member","description":"Removes a member from the Enterprise subteam and its Spaces. They stay on the team. The team's owners and admins are in every subteam; change their team role instead.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"subTeamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"subTeamId":{"type":"string"},"userId":{"type":"string"}},"required":["subTeamId","userId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/activity":{"get":{"operationId":"listActivity","summary":"List activity events","description":"Returns the activity feed visible to your credential, newest-first. Filter by event code, space, or principal.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"principalType","in":"query","required":false,"schema":{"description":"Filter by owning principal type.","type":"string","enum":["team","external"]}},{"name":"principalId","in":"query","required":false,"schema":{"description":"Filter to one principal.","type":"string","minLength":1}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Filter to one space.","type":"string","minLength":1}},{"name":"actorType","in":"query","required":false,"schema":{"description":"Filter by acting credential type.","type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]}},{"name":"actorId","in":"query","required":false,"schema":{"description":"Filter to one actor — a user id, grant id, or key id.","type":"string","minLength":1}},{"name":"code","in":"query","required":false,"schema":{"description":"Filter to one event code, for example `space.created`.","type":"string","minLength":1}},{"name":"since","in":"query","required":false,"schema":{"description":"Only events at or after this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the event's tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string","minLength":1},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string","minLength":1}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"spaceId":{"type":["string","null"]},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},"code":{"type":"string"},"message":{"type":"string"},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"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","sequence","tenantId","mode","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/activity":{"get":{"operationId":"listSpaceActivity","summary":"List a space's activity","description":"Returns the activity feed for one space, newest-first.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"principalType","in":"query","required":false,"schema":{"description":"Filter by owning principal type.","type":"string","enum":["team","external"]}},{"name":"principalId","in":"query","required":false,"schema":{"description":"Filter to one principal.","type":"string","minLength":1}},{"name":"actorType","in":"query","required":false,"schema":{"description":"Filter by acting credential type.","type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]}},{"name":"actorId","in":"query","required":false,"schema":{"description":"Filter to one actor — a user id, grant id, or key id.","type":"string","minLength":1}},{"name":"code","in":"query","required":false,"schema":{"description":"Filter to one event code, for example `space.created`.","type":"string","minLength":1}},{"name":"since","in":"query","required":false,"schema":{"description":"Only events at or after this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the event's tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string","minLength":1},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string","minLength":1}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"spaceId":{"type":["string","null"]},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},"code":{"type":"string"},"message":{"type":"string"},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"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","sequence","tenantId","mode","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/teams/{teamId}/activity":{"get":{"operationId":"listTeamActivity","summary":"List a team's activity","description":"Returns the activity feed for one team and its spaces, newest-first.","security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Filter to one space.","type":"string","minLength":1}},{"name":"actorType","in":"query","required":false,"schema":{"description":"Filter by acting credential type.","type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]}},{"name":"actorId","in":"query","required":false,"schema":{"description":"Filter to one actor — a user id, grant id, or key id.","type":"string","minLength":1}},{"name":"code","in":"query","required":false,"schema":{"description":"Filter to one event code, for example `space.created`.","type":"string","minLength":1}},{"name":"since","in":"query","required":false,"schema":{"description":"Only events at or after this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the event's tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string","minLength":1},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string","minLength":1}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"spaceId":{"type":["string","null"]},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},"code":{"type":"string"},"message":{"type":"string"},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"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","sequence","tenantId","mode","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/logs":{"get":{"operationId":"listSpaceLogs","summary":"List a space's request logs","description":"Returns the current finite HTTP access-log snapshot for one space.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"since","in":"query","required":false,"schema":{"description":"Start of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"ts":{"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))$"},"timestamp":{"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))$"},"host":{"type":"string"},"hostname":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["ts","timestamp","host","hostname","method","path","status","bytes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false},"warnings":{"description":"List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/diagnostics":{"get":{"operationId":"getSpaceDiagnostics","summary":"Get a space's diagnostics","description":"Returns current publish, runtime, routing, and domain diagnostics.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]},"id":{"type":"string","description":"Stable diagnostic record id."},"versionId":{"type":"string","description":"Version the diagnostic was recorded against."},"createdAt":{"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":["code","severity","message","id","versionId","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/analytics":{"get":{"operationId":"getSpaceAnalytics","summary":"Get a space's analytics","description":"Returns traffic analytics for one space over a bounded time window.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"window","in":"query","required":false,"schema":{"description":"Analytics summary window. Defaults to \"7d\".","type":"string","enum":["48h","7d","30d"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string","description":"The space id the traffic was aggregated for."},"window":{"type":"string","enum":["48h","7d","30d"],"description":"Resolved summary window."},"since":{"type":"string","description":"Window start (ISO 8601)."},"until":{"type":"string","description":"Window end (ISO 8601)."},"granularity":{"type":"string","enum":["hourly","daily"],"description":"Series bucket size: hourly for the 48h window, daily otherwise."},"views":{"type":"number","description":"Successful non-crawler requests (status < 400, assets included) over the window."},"bandwidthBytes":{"type":"number","description":"Total response bytes in the window."},"visitorsByDay":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"UTC day (ISO 8601)."},"visitors":{"type":"number"}},"required":["date","visitors"],"additionalProperties":false},"description":"Daily unique-visitor estimates. Daily is the provider's finest uniques resolution, and uniques are never summed across days."},"topPaths":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"views":{"type":"number"}},"required":["path","views"],"additionalProperties":false},"description":"Most-viewed paths, capped at 10."},"topHosts":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string"},"views":{"type":"number"}},"required":["host","views"],"additionalProperties":false},"description":"Most-viewed hostnames, capped at 10."},"series":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string","description":"Bucket start (ISO 8601)."},"requests":{"type":"number"},"views":{"type":"number"},"bandwidthBytes":{"type":"number"}},"required":["bucket","requests","views","bandwidthBytes"],"additionalProperties":false},"description":"Time series across the window."}},"required":["spaceId","window","since","until","granularity","views","bandwidthBytes","visitorsByDay","topPaths","topHosts","series"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/abuse-reports":{"post":{"operationId":"createAbuseReport","summary":"Report abusive content","description":"Reports a space or URL for abuse (malware, phishing, illegal content). Reports are reviewed and may disable the space.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the reported content."},"category":{"type":"string","enum":["malware","phishing","spam","copyright","illegal_content","other"],"description":"Reported abuse category."},"description":{"type":"string","minLength":10,"maxLength":5000,"description":"What the reporter saw."}},"required":["url","category","description"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the reported content."},"category":{"type":"string","enum":["malware","phishing","spam","copyright","illegal_content","other"],"description":"Reported abuse category."},"description":{"type":"string","minLength":10,"maxLength":5000,"description":"What the reporter saw."}},"required":["url","category","description"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the reported content."},"category":{"type":"string","enum":["malware","phishing","spam","copyright","illegal_content","other"],"description":"Reported abuse category."},"description":{"type":"string","minLength":10,"maxLength":5000,"description":"What the reporter saw."}},"required":["url","category","description"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Abuse report id."},"status":{"type":"string","enum":["new","reviewing","actioned","closed"],"description":"Triage status of the report."},"category":{"type":"string","enum":["malware","phishing","spam","copyright","illegal_content","other"],"description":"Reported abuse category."},"url":{"type":"string","description":"Reported URL."},"spaceId":{"description":"Space the reported hostname resolved to.","type":["string","null"]},"createdAt":{"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))$","description":"When the report was filed."}},"required":["id","status","category","url","spaceId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/feedback":{"post":{"operationId":"createFeedback","summary":"Send feedback to Spacefast","description":"Send feedback with optional error, request, space, or URL context.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"category":{"default":"other","type":"string","enum":["bug","docs","limit","idea","other"]},"context":{"type":"object","properties":{"errorCode":{"type":"string","minLength":1,"maxLength":128},"requestId":{"type":"string","minLength":1,"maxLength":128},"spaceId":{"type":"string","minLength":1,"maxLength":128},"url":{"type":"string","maxLength":2000,"format":"uri"}}}},"required":["message"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"category":{"default":"other","type":"string","enum":["bug","docs","limit","idea","other"]},"context":{"type":"object","properties":{"errorCode":{"type":"string","minLength":1,"maxLength":128},"requestId":{"type":"string","minLength":1,"maxLength":128},"spaceId":{"type":"string","minLength":1,"maxLength":128},"url":{"type":"string","maxLength":2000,"format":"uri"}}}},"required":["message"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":4000},"category":{"default":"other","type":"string","enum":["bug","docs","limit","idea","other"]},"context":{"type":"object","properties":{"errorCode":{"type":"string","minLength":1,"maxLength":128},"requestId":{"type":"string","minLength":1,"maxLength":128},"spaceId":{"type":"string","minLength":1,"maxLength":128},"url":{"type":"string","maxLength":2000,"format":"uri"}}}},"required":["message"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ref":{"type":"string"}},"required":["ref"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"get":{"operationId":"listFeedback","summary":"List the feedback you sent","description":"Returns the feedback that the signed-in user sent, newest first.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Maximum number of feedback entries to return, newest first.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string","description":"Feedback reference returned when the feedback was sent."},"category":{"type":"string","enum":["bug","docs","limit","idea","other"]},"message":{"type":"string"},"context":{"type":"object","properties":{"errorCode":{"type":["string","null"]},"requestId":{"type":["string","null"]},"spaceId":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["errorCode","requestId","spaceId","url"],"additionalProperties":false},"createdAt":{"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":["ref","category","message","context","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/feedback/{ref}":{"get":{"operationId":"getFeedback","summary":"Get feedback you sent","description":"Returns one feedback entry by its reference. Only the signed-in user who sent it can read it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ref":{"type":"string","description":"Feedback reference returned when the feedback was sent."},"category":{"type":"string","enum":["bug","docs","limit","idea","other"]},"message":{"type":"string"},"context":{"type":"object","properties":{"errorCode":{"type":["string","null"]},"requestId":{"type":["string","null"]},"spaceId":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["errorCode","requestId","spaceId","url"],"additionalProperties":false},"createdAt":{"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":["ref","category","message","context","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/events":{"post":{"operationId":"submitEvents","summary":"Submit first-party events","description":"Send registered events from first-party clients as JSON. Limit each request to 20 events and 64 KiB. Exclude personal data. Control-plane events are server-only. Requests are rate-limited.","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source":{"default":"other","type":"string","enum":["dashboard","www","cli","domain-ssh","control-plane","other"]},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","enum":["client.page_viewed","client.web_vital.measured","client.error.observed","cli.agent_tooling.outcome","browser.funnel.claim_page_viewed","browser.funnel.claim_token_validated","browser.funnel.space_claimed","browser.funnel.start_step_viewed","browser.funnel.start_option_chosen","browser.funnel.start_prompt_copied","domain.search.session_started","domain.search.session_ended","domain.search.lookup_requested","publish.receipt.created","version.intent.created","version.finalize.queued","version.promote.queued","auth.agent_handoff.redeemed","auth.agent_handoff.fetched","feature.blocked","abuse.limit_tripped"]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"analytics_id"},"id":{"type":"string","minLength":1,"maxLength":64,"description":"Opaque analytics id minted by the platform; never an email or a name."}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_id"},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_machine"},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_session"},"namespace":{"type":"string","minLength":1,"maxLength":64},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","namespace","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"system"},"id":{"type":"string","minLength":1,"maxLength":128}},"required":["type","id"],"additionalProperties":false}]},"context":{"default":{},"type":"object","properties":{"team_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"space_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"user_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"version_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"client":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"surface":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]}},"additionalProperties":false},"properties":{"default":{},"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":512},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},"occurredAt":{"description":"Client-side event time; server receipt time is authoritative when omitted.","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":["name","actor"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}},"required":true},"responses":{"202":{"description":"Response for status 202","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["accepted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/api-keys":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listApiKeys","summary":"List a team's API keys","description":"Returns the team's API keys with previews and policies. Full secrets are returned only once at creation.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Owning team whose keys to list. Defaults to the caller's own team; any team the credential policy reaches is allowed.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"API key id."},"name":{"description":"Human-readable key name.","type":["string","null"]},"tenantId":{"description":"Tenant the key belongs to.","type":["string","null"]},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the key belongs to a linked test tenant, `live` otherwise."},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind the key acts as in audit records."},"id":{"type":"string","minLength":1,"description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Subject the key acts as."},"ownerPrincipal":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Principal type that owns this key."},"id":{"type":"string","minLength":1,"description":"Stable principal id (Better Auth team id, or external id)."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Owning principal (ownership metadata, never the authorization gate)."},"createdByUserId":{"description":"User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.","type":["string","null"]},"collection":{"type":"string","enum":["team","tenant"],"description":"Disjoint resource collection this key addresses."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","domain_manager","team_admin","billing_viewer","partner_admin"],"description":"Preset compiled into a concrete access policy when the key is created."},{"type":"null"}],"description":"Preset the policy was compiled from, if any."},"teamScope":{"anyOf":[{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},{"type":"null"}],"description":"Membership-following team scope for a device-login key, or null for legacy keys."},"policy":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"2026-06-09","description":"Must be the current platform policy version."},"statements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Explicit deny always wins over allow."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Actions this statement covers."},"resources":{"minItems":1,"type":"array","items":{"type":"string","maxLength":512,"description":"Resource URI from the resource union: stt://tenant/{t}, …/partner/{team}[/*], …/partner/{team}/principal/{id}[/*], …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}."},"description":"Resource URIs this statement covers (wildcards cover subtrees)."},"conditions":{"description":"AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.","type":"object","properties":{"request.client":{"description":"Restricts the statement to one resolved request client.","type":"string","enum":["dashboard","cli","api","worker"]}},"additionalProperties":false}},"required":["effect","actions","resources"],"additionalProperties":false},"description":"Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."}},"required":["version","statements"],"additionalProperties":false,"description":"IAM-lite access policy evaluated for every credentialed request."},{"type":"null"}],"description":"Effective access policy. A key authorizes by policy only."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Caller-supplied metadata."},"secretPreview":{"type":"string","description":"Masked secret preview (prefix and last characters)."},"notBefore":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected before this instant."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected from this instant."},"ipAllowlist":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"CIDR/IP allowlist. Requests from other addresses are rejected."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Revocation instant."},"enabled":{"type":"boolean","description":"Whether the key currently authenticates."},"createdAt":{"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))$","description":"Creation instant."},"updatedAt":{"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))$","description":"Last update instant."},"lastRequestAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last authenticated request instant."}},"required":["id","name","tenantId","mode","subject","ownerPrincipal","createdByUserId","collection","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"createApiKey","summary":"Create an API key","description":"Creates an API key with a finite scope and permission set. The policy cannot exceed the caller's current access. A device-login credential without standing key-mint access must send Idempotency-Key. The server then returns a browser approval step. After approval, send the same request body and Idempotency-Key with X-Spacefast-Continuation-Token. The response returns the full secret one time.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Human-readable key name.","type":"string","minLength":1,"maxLength":255},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}],"description":"Explicit, finite policy target. A space scope narrows the derived policy to exactly that space, never the owning team's whole tree."},"permissions":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Finite permission set the derived policy grants, and nothing beyond it."},"metadata":{"description":"Caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"CIDR/IP allowlist for the new key.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"required":["scope","permissions"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Human-readable key name.","type":"string","minLength":1,"maxLength":255},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}],"description":"Explicit, finite policy target. A space scope narrows the derived policy to exactly that space, never the owning team's whole tree."},"permissions":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Finite permission set the derived policy grants, and nothing beyond it."},"metadata":{"description":"Caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"CIDR/IP allowlist for the new key.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"required":["scope","permissions"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Human-readable key name.","type":"string","minLength":1,"maxLength":255},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}],"description":"Explicit, finite policy target. A space scope narrows the derived policy to exactly that space, never the owning team's whole tree."},"permissions":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Finite permission set the derived policy grants, and nothing beyond it."},"metadata":{"description":"Caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"CIDR/IP allowlist for the new key.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"required":["scope","permissions"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"API key id."},"name":{"description":"Human-readable key name.","type":["string","null"]},"tenantId":{"description":"Tenant the key belongs to.","type":["string","null"]},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the key belongs to a linked test tenant, `live` otherwise."},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind the key acts as in audit records."},"id":{"type":"string","minLength":1,"description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Subject the key acts as."},"ownerPrincipal":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Principal type that owns this key."},"id":{"type":"string","minLength":1,"description":"Stable principal id (Better Auth team id, or external id)."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Owning principal (ownership metadata, never the authorization gate)."},"createdByUserId":{"description":"User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.","type":["string","null"]},"collection":{"type":"string","enum":["team","tenant"],"description":"Disjoint resource collection this key addresses."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","domain_manager","team_admin","billing_viewer","partner_admin"],"description":"Preset compiled into a concrete access policy when the key is created."},{"type":"null"}],"description":"Preset the policy was compiled from, if any."},"teamScope":{"anyOf":[{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},{"type":"null"}],"description":"Membership-following team scope for a device-login key, or null for legacy keys."},"policy":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"2026-06-09","description":"Must be the current platform policy version."},"statements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Explicit deny always wins over allow."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Actions this statement covers."},"resources":{"minItems":1,"type":"array","items":{"type":"string","maxLength":512,"description":"Resource URI from the resource union: stt://tenant/{t}, …/partner/{team}[/*], …/partner/{team}/principal/{id}[/*], …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}."},"description":"Resource URIs this statement covers (wildcards cover subtrees)."},"conditions":{"description":"AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.","type":"object","properties":{"request.client":{"description":"Restricts the statement to one resolved request client.","type":"string","enum":["dashboard","cli","api","worker"]}},"additionalProperties":false}},"required":["effect","actions","resources"],"additionalProperties":false},"description":"Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."}},"required":["version","statements"],"additionalProperties":false,"description":"IAM-lite access policy evaluated for every credentialed request."},{"type":"null"}],"description":"Effective access policy. A key authorizes by policy only."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Caller-supplied metadata."},"secretPreview":{"type":"string","description":"Masked secret preview (prefix and last characters)."},"notBefore":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected before this instant."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected from this instant."},"ipAllowlist":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"CIDR/IP allowlist. Requests from other addresses are rejected."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Revocation instant."},"enabled":{"type":"boolean","description":"Whether the key currently authenticates."},"createdAt":{"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))$","description":"Creation instant."},"updatedAt":{"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))$","description":"Last update instant."},"lastRequestAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last authenticated request instant."},"secret":{"type":"string","description":"Full secret. Returned once, at creation only."}},"required":["id","name","tenantId","mode","subject","ownerPrincipal","createdByUserId","collection","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt","secret"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Required for the browser approval flow. Optional for a credential that has `tokens:create`. Use a client-generated key of at most 255 characters. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it `Idempotency-Replayed: true`. A request that reuses a key with a different body fails with 409 `idempotency_key_reused`. A duplicate request that arrives while the first is still in flight fails with 409 `idempotency_conflict_in_progress`. The server keeps each key for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"X-Spacefast-Continuation-Token","in":"header","required":false,"description":"Continuation token from an approved `confirmation_required` response. Send it only with the same request body and Idempotency-Key.","schema":{"type":"string","maxLength":4096}}]}},"/v1/api-keys/{apiKeyId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getApiKey","summary":"Get an API key","description":"Returns one API key's metadata, preview, and policy. The secret is never readable after creation.","parameters":[{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"API key id."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"API key id."},"name":{"description":"Human-readable key name.","type":["string","null"]},"tenantId":{"description":"Tenant the key belongs to.","type":["string","null"]},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the key belongs to a linked test tenant, `live` otherwise."},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind the key acts as in audit records."},"id":{"type":"string","minLength":1,"description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Subject the key acts as."},"ownerPrincipal":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Principal type that owns this key."},"id":{"type":"string","minLength":1,"description":"Stable principal id (Better Auth team id, or external id)."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Owning principal (ownership metadata, never the authorization gate)."},"createdByUserId":{"description":"User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.","type":["string","null"]},"collection":{"type":"string","enum":["team","tenant"],"description":"Disjoint resource collection this key addresses."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","domain_manager","team_admin","billing_viewer","partner_admin"],"description":"Preset compiled into a concrete access policy when the key is created."},{"type":"null"}],"description":"Preset the policy was compiled from, if any."},"teamScope":{"anyOf":[{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},{"type":"null"}],"description":"Membership-following team scope for a device-login key, or null for legacy keys."},"policy":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"2026-06-09","description":"Must be the current platform policy version."},"statements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Explicit deny always wins over allow."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Actions this statement covers."},"resources":{"minItems":1,"type":"array","items":{"type":"string","maxLength":512,"description":"Resource URI from the resource union: stt://tenant/{t}, …/partner/{team}[/*], …/partner/{team}/principal/{id}[/*], …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}."},"description":"Resource URIs this statement covers (wildcards cover subtrees)."},"conditions":{"description":"AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.","type":"object","properties":{"request.client":{"description":"Restricts the statement to one resolved request client.","type":"string","enum":["dashboard","cli","api","worker"]}},"additionalProperties":false}},"required":["effect","actions","resources"],"additionalProperties":false},"description":"Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."}},"required":["version","statements"],"additionalProperties":false,"description":"IAM-lite access policy evaluated for every credentialed request."},{"type":"null"}],"description":"Effective access policy. A key authorizes by policy only."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Caller-supplied metadata."},"secretPreview":{"type":"string","description":"Masked secret preview (prefix and last characters)."},"notBefore":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected before this instant."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected from this instant."},"ipAllowlist":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"CIDR/IP allowlist. Requests from other addresses are rejected."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Revocation instant."},"enabled":{"type":"boolean","description":"Whether the key currently authenticates."},"createdAt":{"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))$","description":"Creation instant."},"updatedAt":{"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))$","description":"Last update instant."},"lastRequestAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last authenticated request instant."}},"required":["id","name","tenantId","mode","subject","ownerPrincipal","createdByUserId","collection","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"updateApiKey","summary":"Update an API key","description":"Updates a key's metadata, scope and permissions, expiry, activation time, or IP allowlist. Secrets are immutable; create a new key to rotate them.","parameters":[{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"API key id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Replacement name.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"scope":{"description":"Replacement policy target. Must be supplied together with permissions.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}]},"permissions":{"description":"Replacement finite permission set. Must be supplied together with scope.","minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."}},"metadata":{"description":"Replacement caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"Replacement CIDR/IP allowlist.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Replacement expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Replacement name.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"scope":{"description":"Replacement policy target. Must be supplied together with permissions.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}]},"permissions":{"description":"Replacement finite permission set. Must be supplied together with scope.","minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."}},"metadata":{"description":"Replacement caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"Replacement CIDR/IP allowlist.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Replacement expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"description":"Replacement name.","anyOf":[{"type":"string","minLength":1,"maxLength":255},{"type":"null"}]},"scope":{"description":"Replacement policy target. Must be supplied together with permissions.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceId":{"type":"string","minLength":1}},"required":["kind","spaceId"],"additionalProperties":false}]},"permissions":{"description":"Replacement finite permission set. Must be supplied together with scope.","minItems":1,"maxItems":64,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."}},"metadata":{"description":"Replacement caller-supplied metadata.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"ipAllowlist":{"description":"Replacement CIDR/IP allowlist.","anyOf":[{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}},{"type":"null"}]},"expiresAt":{"description":"Replacement expiry instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"API key id."},"name":{"description":"Human-readable key name.","type":["string","null"]},"tenantId":{"description":"Tenant the key belongs to.","type":["string","null"]},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the key belongs to a linked test tenant, `live` otherwise."},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind the key acts as in audit records."},"id":{"type":"string","minLength":1,"description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Subject the key acts as."},"ownerPrincipal":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Principal type that owns this key."},"id":{"type":"string","minLength":1,"description":"Stable principal id (Better Auth team id, or external id)."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Owning principal (ownership metadata, never the authorization gate)."},"createdByUserId":{"description":"User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.","type":["string","null"]},"collection":{"type":"string","enum":["team","tenant"],"description":"Disjoint resource collection this key addresses."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","domain_manager","team_admin","billing_viewer","partner_admin"],"description":"Preset compiled into a concrete access policy when the key is created."},{"type":"null"}],"description":"Preset the policy was compiled from, if any."},"teamScope":{"anyOf":[{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},{"type":"null"}],"description":"Membership-following team scope for a device-login key, or null for legacy keys."},"policy":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"2026-06-09","description":"Must be the current platform policy version."},"statements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Explicit deny always wins over allow."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Actions this statement covers."},"resources":{"minItems":1,"type":"array","items":{"type":"string","maxLength":512,"description":"Resource URI from the resource union: stt://tenant/{t}, …/partner/{team}[/*], …/partner/{team}/principal/{id}[/*], …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}."},"description":"Resource URIs this statement covers (wildcards cover subtrees)."},"conditions":{"description":"AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.","type":"object","properties":{"request.client":{"description":"Restricts the statement to one resolved request client.","type":"string","enum":["dashboard","cli","api","worker"]}},"additionalProperties":false}},"required":["effect","actions","resources"],"additionalProperties":false},"description":"Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."}},"required":["version","statements"],"additionalProperties":false,"description":"IAM-lite access policy evaluated for every credentialed request."},{"type":"null"}],"description":"Effective access policy. A key authorizes by policy only."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Caller-supplied metadata."},"secretPreview":{"type":"string","description":"Masked secret preview (prefix and last characters)."},"notBefore":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected before this instant."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected from this instant."},"ipAllowlist":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"CIDR/IP allowlist. Requests from other addresses are rejected."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Revocation instant."},"enabled":{"type":"boolean","description":"Whether the key currently authenticates."},"createdAt":{"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))$","description":"Creation instant."},"updatedAt":{"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))$","description":"Last update instant."},"lastRequestAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last authenticated request instant."}},"required":["id","name","tenantId","mode","subject","ownerPrincipal","createdByUserId","collection","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"revokeApiKey","summary":"Revoke an API key","description":"Revokes a key so it stops authenticating immediately. The record is retained for audit.","responses":{"204":{"description":"The key was revoked."}},"parameters":[{"name":"apiKeyId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"API key id."}}],"tags":["Account"]}},"/v1/docs/ask":{"post":{"x-spacefast-read-only":true,"operationId":"askDocs","description":"Streams a documentation-grounded answer as plain UTF-8 text. The request contract is compatible with Blume's external Ask AI endpoint.","responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"A streamed documentation-grounded answer."},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"summary":"Ask the Spacefast documentation","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":8000},"role":{"type":"string","enum":["user","assistant"]}},"required":["content","role"]}},"page":{"type":"object","properties":{"path":{"type":"string","maxLength":512,"pattern":"^\\/.*"}},"required":["path"]}},"required":["messages"]}}},"required":true},"tags":["Docs"]}},"/v1/docs/search":{"get":{"operationId":"searchDocs","summary":"Search the published documentation","description":"Search the published Spacefast documentation. The response includes ranked pages and short excerpts. An exact slug or path matches one page and returns it in full, including its Markdown `body`. An empty query lists pages in the selected tier and kind. Use `nextOffset` as `offset` until `hasMore` is false.","parameters":[{"name":"q","in":"query","required":false,"schema":{"description":"Free-text query. An exact slug or path matches one page. Omit this query to list eligible pages.","type":"string","maxLength":512}},{"name":"limit","in":"query","required":false,"schema":{"description":"Maximum results to return, up to 25. The default is 8.","type":"integer","minimum":1,"maximum":25}},{"name":"offset","in":"query","required":false,"schema":{"description":"Number of ranked results to skip. Use `nextOffset` to continue a search.","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"kind","in":"query","required":false,"schema":{"description":"Restrict to one docs area: `guide`, `cli`, `api`, `recipe`, `workflow`, or `error`.","type":"string","enum":["guide","cli","api","recipe","workflow","error"]}},{"name":"tier","in":"query","required":false,"schema":{"description":"Disclosure tier ceiling (cumulative). Defaults to `reference`, which searches everything.","type":"string","enum":["essential","full","reference"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"string","description":"Revision of the published docs corpus that served this search."},"query":{"description":"The trimmed query, or null when listing.","type":["string","null"]},"exact":{"type":"boolean","description":"True when the query matched one page's slug or path exactly, so only it is returned."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of results returned."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of results for this search."},"hasMore":{"type":"boolean","description":"True when more results are available."},"nextOffset":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Offset for the next request. Null means that no more results are available."},"results":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Stable page id, for example `publishing` or `api/reference/publish`."},"path":{"type":"string","description":"Docs-site path, for example `/publishing`."},"url":{"type":"string","format":"uri","description":"Canonical human-readable docs URL."},"title":{"type":"string"},"kind":{"type":"string","enum":["guide","cli","api","recipe","workflow","error"]},"tier":{"type":"string","enum":["essential","full","reference"]},"summary":{"type":"string"},"excerpt":{"type":"string","description":"Short window of the page body around the first query match."},"body":{"description":"Full Markdown body of the page. Present only on an exact match, where naming one page is a request to read it.","type":"string"}},"required":["slug","path","url","title","kind","tier","summary","excerpt"],"additionalProperties":false}}},"required":["revision","query","exact","count","total","hasMore","nextOffset","results"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Docs"]}},"/v1/docs":{"get":{"operationId":"listDocs","summary":"List the documentation index","description":"Returns the machine-readable documentation index as JSON, including guides, CLI, API reference, and recipes. The default tier is `essential`; pass `tier=reference` to get everything. Filter with `q` (free-text) and `category` (guide|cli|api|recipe). The response comes from an in-memory index built from the same catalog as the CLI `sf docs`, so the two never drift.","parameters":[{"name":"q","in":"query","required":false,"schema":{"description":"Free-text search across slug, title, summary, and keywords.","type":"string"}},{"name":"tier","in":"query","required":false,"schema":{"default":"essential","description":"Disclosure tier to list. `essential` (default) shows the core pages; `full` adds advanced pages; `reference` returns everything.","type":"string","enum":["essential","full","reference"]}},{"name":"category","in":"query","required":false,"schema":{"description":"Restrict to one docs area: `guide`, `cli`, `api`, `recipe`, `workflow`, or `error`.","type":"string","enum":["guide","cli","api","recipe","workflow","error"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tier":{"type":"string","enum":["essential","full","reference"],"description":"The tier the listing ran at."},"query":{"description":"The trimmed `q` query, or null when listing.","type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["guide","cli","api","recipe","workflow","error"]},{"type":"null"}],"description":"The applied category filter, or null."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of entries returned."},"entries":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Stable topic id, for example `publishing` or `api/spaces`."},"title":{"type":"string"},"summary":{"type":"string"},"category":{"type":"string","enum":["guide","cli","api","recipe","workflow","error"]},"tier":{"type":"string","enum":["essential","full","reference"]},"keywords":{"type":"array","items":{"type":"string"},"description":"Extra search terms that match this page."},"url":{"type":"string","format":"uri","description":"Canonical docs URL: the docs site page, or the docs API page for topics the docs site does not publish, such as recipes."},"links":{"type":"object","properties":{"doc":{"type":"string","format":"uri","description":"Canonical docs URL: the docs site page, or the docs API page for topics the docs site does not publish, such as recipes."},"self":{"type":"string","description":"API-relative link to this entry's JSON (`/v1/docs/pages/{slug}`)."}},"required":["doc","self"],"additionalProperties":false}},"required":["slug","title","summary","category","tier","keywords","url","links"],"additionalProperties":false}}},"required":["tier","query","category","count","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Docs"]}},"/v1/context":{"get":{"security":[{},{"claimTokenAuth":[]},{"bearerAuth":[]},{"sessionCookie":[]}],"operationId":"getContext","summary":"Read the context of your token","description":"Introspects the caller behind the request. Any caller can read it — a browser session, an API key, a machine credential, a Space key, a partner token, or no credential at all — and every answer carries the Spacefast agent instructions as Markdown, filtered by `scopes` and budgeted for the `consumer`. An authenticated caller also gets a `credential` block naming what kind of token it is and what it is bound to, and a user-owned interactive grant gets a `capabilities` map of the operations its scopes allow.","parameters":[{"name":"scopes","in":"query","required":false,"schema":{"description":"Comma-separated (or repeated) AGENT_PROSE fragment keys.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"consumer","in":"query","required":false,"schema":{"default":"markdown","description":"Which client is reading, so the fragments come back shaped for it.","type":"string","enum":["cursor","mcp","markdown"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"consumer":{"default":"markdown","description":"Which client is reading, so the fragments come back shaped for it.","type":"string","enum":["cursor","mcp","markdown"]},"scopes":{"type":"array","items":{"type":"string"},"description":"The instruction fragment keys included in `markdown`, in reading order."},"markdown":{"type":"string","description":"The Spacefast agent instructions. Identical for every caller."},"truncated":{"type":"boolean"},"omittedScopes":{"type":"array","items":{"type":"string"}},"credential":{"description":"The credential behind this request and what it is bound to. Absent for an anonymous caller.","type":"object","properties":{"kind":{"type":"string","enum":["session","api_key","partner_token","oauth_client","runtime","internal","claim_token"],"description":"What the caller presented, in the platform's own credential vocabulary."},"authorizationId":{"description":"Stable identity of the credential itself — the API key or OAuth client row.","type":"string"},"subject":{"description":"Whose authority the credential spends.","type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"tenantId":{"type":"string"},"userId":{"description":"The person who created the credential, when one did.","type":"string"},"ownerPrincipal":{"description":"The principal that owns the credential. Absent on platform-owned credentials.","type":"object","properties":{"type":{"type":"string","enum":["team","external"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"teams":{"description":"The teams the credential may act in.","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},"grantId":{"description":"The grant the credential spends, when it spends one.","type":"string"},"authorizationLevel":{"description":"Whether that grant carries the authorizing person's authority or their team's.","type":"string","enum":["user","team"]},"expiresAt":{"type":"string"}},"required":["kind"],"additionalProperties":false},"capabilities":{"description":"What the calling grant may do, present only for user-owned interactive agent grants. Advisory: it never replaces a route's own authorization.","type":"object","properties":{"enabled":{"type":"boolean"},"degraded":{"type":"boolean"},"grantId":{"type":"string"},"authorizationLevel":{"type":"string","const":"user"},"grantedScopes":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"operations":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"action":{"type":"string"},"available":{"type":"boolean"},"reason":{"type":"string"},"acceptableScopeSets":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"missingScopes":{"type":"array","items":{"type":"string"}}},"required":["operation","action","available","reason","acceptableScopeSets","missingScopes"],"additionalProperties":false}}},"required":["enabled","degraded","grantId","authorizationLevel","grantedScopes","operations"],"additionalProperties":false}},"required":["consumer","scopes","markdown"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/webhooks":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listWebhooks","summary":"List webhooks","description":"Lists the webhooks on teams that your credential can read, newest first. A tenant-rooted credential also sees the tenant's own subscriptions, declared in its system-space manifest.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing","deleted"]},"secret":{"type":"string"},"secretPreview":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","mode","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"createWebhook","summary":"Create a webhook","description":"Creates a webhook delivering the selected activity events to a public HTTPS endpoint. The signing secret is returned only in this response.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"default":["*"],"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["url"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"default":["*"],"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["url"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"events":{"default":["*"],"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["url"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing","deleted"]},"secret":{"type":"string"},"secretPreview":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","mode","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/webhooks/{webhookId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"operationId":"getWebhook","summary":"Get a webhook","description":"Returns one webhook's URL, subscribed events, status, and secret preview.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing","deleted"]},"secret":{"type":"string"},"secretPreview":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","mode","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"updateWebhook","summary":"Update a webhook","description":"Updates a webhook's URL, subscribed events, or status. Secrets rotate only via the rotate operation. A webhook declared in a system-space manifest is configured there, not here.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"status":{"type":"string","enum":["active","disabled"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"status":{"type":"string","enum":["active","disabled"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"status":{"type":"string","enum":["active","disabled"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing","deleted"]},"secret":{"type":"string"},"secretPreview":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","mode","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"deleteWebhook","summary":"Delete a webhook","description":"Deletes a webhook from customer-facing surfaces so deliveries stop. The record and delivery history are retained for internal audit. A webhook declared in a system-space manifest is removed by dropping it from that manifest.","responses":{"204":{"description":"The webhook was deleted."}},"parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Activity"]}},"/v1/webhooks/{webhookId}/rotate":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"rotateWebhook","summary":"Rotate a webhook's secret","description":"Issues a new signing secret, returned only in this response. The previous secret stays valid briefly unless expireNow is set. Manifest-declared webhooks rotate here too: the manifest declares a url and events, never a secret.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expireNow":{"default":false,"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expireNow":{"default":false,"type":"boolean"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expireNow":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise."},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["active","disabled","failing","deleted"]},"secret":{"type":"string"},"secretPreview":{"type":"string"},"previousSecretExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","mode","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/webhooks/{webhookId}/deliveries":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"operationId":"listWebhookDeliveries","summary":"List a webhook's deliveries","description":"Returns the webhook's delivery attempts with statuses and diagnostics, newest-first.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"webhookId":{"type":"string"},"eventId":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastAttemptAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastResponseStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"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))$"},{"type":"null"}]},"redeliveredFromId":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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","webhookId","eventId","status","attempts","lastAttemptAt","lastResponseStatus","nextRetryAt","redeliveredFromId","diagnostics","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/webhooks/{webhookId}/deliveries/{deliveryId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"operationId":"getWebhookDelivery","summary":"Get a webhook delivery","description":"Returns one delivery attempt with its status, attempts, and response diagnostics.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"webhookId":{"type":"string"},"eventId":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastAttemptAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastResponseStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"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))$"},{"type":"null"}]},"redeliveredFromId":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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","webhookId","eventId","status","attempts","lastAttemptAt","lastResponseStatus","nextRetryAt","redeliveredFromId","diagnostics","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"redeliverWebhookDelivery","summary":"Redeliver a webhook event","description":"Queues a fresh delivery of a past event to the webhook's endpoint.","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"webhookId":{"type":"string"},"eventId":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","exhausted"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastAttemptAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastResponseStatus":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"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))$"},{"type":"null"}]},"redeliveredFromId":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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","webhookId","eventId","status","attempts","lastAttemptAt","lastResponseStatus","nextRetryAt","redeliveredFromId","diagnostics","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/me":{"get":{"operationId":"getMe","summary":"Get the authenticated identity","description":"Returns the authenticated subject with its tenant grants, team memberships, and per-team plan summary.","security":[{"bearerAuth":[]}],"parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Return the plan summary and membership for this team rather than the default one.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"subject":{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind: the session user, or the machine credential's acting subject."},"id":{"type":"string","description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false,"description":"The authenticated subject of the calling credential."},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"User id."},"email":{"description":"User email.","type":["string","null"]},"name":{"description":"User display name.","type":["string","null"]},"isAutomattician":{"type":"boolean","description":"Whether the linked WordPress.com account is an Automattician."},"wpcom":{"description":"Deprecated compatibility field. Current servers return null; readers accept older provider profiles and responses that omitted this field during the rolling upgrade.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"isSuperadmin":{"type":"boolean","description":"Whether the user is a platform operator."},"pendingDeletionAt":{"description":"When this account's deletion was requested, while the close is still running. Null for every account that is not being deleted.","type":["string","null"]},"dashboardPrefs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The user's dashboard preferences. Carried on the boot payload the dashboard already fetches, so applying a cross-device preference costs no extra request. Write with `PATCH /v1/me/dashboard-preferences`."},"privacy":{"type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"required":["analyticsOptOut","advertisingOptOut"],"additionalProperties":false,"description":"The user's account-level privacy choices. Write with `PATCH /v1/me/privacy`."}},"required":["id","email","name","isAutomattician","isSuperadmin","pendingDeletionAt","dashboardPrefs","privacy"],"additionalProperties":false},{"type":"null"}],"description":"Authenticated user identity for user-subject credentials. Null for team-subject or service-subject machine credentials. Creator metadata is retained only for audit attribution, not request identity."},"tenants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tenant id."},"kind":{"type":"string","description":"Tenant kind."},"name":{"type":"string","description":"Tenant display name."},"access":{"type":"string","enum":["full","scoped"],"description":"Grant level the credential's policy holds in this tenant: `full` covers the whole tenant subtree, `scoped` covers specific principals or resources within it."}},"required":["id","kind","name","access"],"additionalProperties":false},"description":"Tenant grants derived from the credential's effective policy. The credential's home tenant is always included."},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Team id."},"tenantId":{"type":"string","description":"Owning tenant id."},"name":{"type":"string","description":"Team display name."},"slug":{"description":"Team slug.","type":["string","null"]},"role":{"description":"The caller's membership role. Null for policy-granted (non-member) access.","type":["string","null"]},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"The team's resolved plan code (plan summary)."}},"required":["id","tenantId","name","slug","role","plan"],"additionalProperties":false},"description":"Teams the credential can act in: session team memberships, or the teams a machine credential's policy grants."},"intercom":{"anyOf":[{"type":"object","properties":{"api_base":{"type":"string","format":"uri","description":"Intercom Messenger API base URL."},"app_id":{"type":"string","description":"Intercom workspace app id."},"user_id":{"type":"string","description":"Stable Intercom user id."},"email":{"description":"User email when available.","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"description":"User display name when available.","type":"string"},"created_at":{"description":"User creation time in Unix seconds.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"company":{"description":"Current team as an Intercom company.","type":"object","properties":{"company_id":{"type":"string","description":"Stable Intercom company id."},"name":{"type":"string","description":"Company display name."},"plan":{"description":"Resolved company plan code.","type":"string","enum":["free","go","plus","gold","enterprise","internal"]}},"required":["company_id","name"],"additionalProperties":false},"intercom_user_jwt":{"type":"string","minLength":1,"description":"Short-lived server-signed Messenger JWT."},"session_duration":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Messenger session cookie TTL in ms."},"expiresAt":{"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))$","description":"JWT expiry timestamp."}},"required":["api_base","app_id","user_id","intercom_user_jwt","session_duration","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"Intercom Messenger boot payload for authenticated browser sessions."},"joinableTeams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string","description":"Team id."},"name":{"type":"string","description":"Team display name."},"slug":{"description":"Team slug.","type":["string","null"]},"source":{"type":"string","enum":["invitation","automattician","parent_membership"],"description":"Why the caller can join the team."},"domainMatch":{"description":"The offer matches a verified company email domain.","type":"boolean"},"parent":{"description":"The team this offered subteam belongs to, or null for a top-level team.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}]}},"required":["teamId","name","slug","source"],"additionalProperties":false},"description":"Teams the user can join without waiting for anyone: a pending invitation or company-domain rule matching any verified email, every subteam of a team the user belongs to, or Automattician access to the Automattic team. Teams the user already belongs to are not listed."},"beta":{"type":"object","properties":{"gateEnabled":{"type":"boolean","const":false},"enrolled":{"type":"boolean","const":true},"eligibleTeams":{"maxItems":0,"type":"array","items":{}}},"required":["gateEnabled","enrolled","eligibleTeams"],"additionalProperties":false,"deprecated":true,"description":"Deprecated. Always `{ gateEnabled: false, enrolled: true, eligibleTeams: [] }`."}},"required":["subject","user","tenants","teams","intercom","joinableTeams","beta"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/grants":{"get":{"operationId":"listGrants","summary":"List the authenticated user's grant ledger","description":"Returns the grants this user has authorized. Pass teamId to enforce team visibility on the server. Team-owned service automation is intentionally excluded.","security":[{"sessionCookie":[]}],"parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Enforce this team's visibility rules on the server before returning.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["agent","app","cli","handoff","api-key","machine"]},"clientName":{"type":"string"},"logoUri":{"type":"string"},"effectiveScopes":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"elevatedUntil":{"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","label"],"additionalProperties":false}},"teamScope":{"anyOf":[{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"}},"required":["teamId","teamName"],"additionalProperties":false},{"type":"null"}]},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["id","name","email"],"additionalProperties":false},"teamName":{"type":"string"},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedLabel":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"createdAt":{"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))$"},"expiresAt":{"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","name","kind","effectiveScopes","scopes","teamScope","lastUsedAt","status","createdAt","expiresAt"],"additionalProperties":false}}},"required":["grants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"delete":{"operationId":"revokeAllGrants","summary":"Revoke all grants","description":"Account-level emergency stop across every team. This does not revoke team-owned service automation.","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","const":"revoked"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["status","count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/teams/{teamRef}/grants":{"get":{"operationId":"listTeamGrants","summary":"List the grants that can act in a team","description":"Returns user-owned grants across team members when their server-stored scope covers this team. Only team administrators can inspect this security ledger; service automation is excluded.","security":[{"sessionCookie":[]}],"parameters":[{"name":"teamRef","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["agent","app","cli","handoff","api-key","machine"]},"clientName":{"type":"string"},"logoUri":{"type":"string"},"effectiveScopes":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"elevatedUntil":{"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","label"],"additionalProperties":false}},"teamScope":{"anyOf":[{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"}},"required":["teamId","teamName"],"additionalProperties":false},{"type":"null"}]},"owner":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["id","name","email"],"additionalProperties":false},"teamName":{"type":"string"},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedLabel":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"createdAt":{"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))$"},"expiresAt":{"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","name","kind","effectiveScopes","scopes","teamScope","lastUsedAt","status","createdAt","expiresAt"],"additionalProperties":false}}},"required":["grants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamRef}/grants/{grantId}":{"delete":{"operationId":"revokeTeamGrant","summary":"Remove one grant's access to a team","description":"Subtracts this team from the grant's reach. The member keeps any access the grant has in their other teams; only when nothing remains does the grant fully revoke. Team administrators only, and only for grants whose scope reaches this team.","security":[{"sessionCookie":[]}],"responses":{"204":{"description":"The grant no longer reaches this team."}},"parameters":[{"name":"teamRef","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/me/grants/{grantId}":{"get":{"operationId":"getGrant","summary":"Get one connection's detail","description":"Returns one grant with its client identity, live team reach, effective access including temporary elevation, and per-session tool policies.","security":[{"sessionCookie":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["agent","app","cli","handoff","api-key","machine"]},"clientName":{"type":"string"},"logoUri":{"type":"string"},"status":{"type":"string","enum":["active","expired","revoked"]},"teams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"}},"required":["teamId","teamName"],"additionalProperties":false}},"allTeams":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"source":{"type":"string","enum":["baseline","elevation"]},"elevatedUntil":{"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","label","source"],"additionalProperties":false}},"toolPolicies":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"tool":{"type":"string"},"teamId":{"type":"string"}},"required":["sessionId","tool","teamId"],"additionalProperties":false}},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"expiresAt":{"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","name","kind","status","teams","allTeams","scopes","toolPolicies","lastUsedAt","createdAt","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"delete":{"operationId":"revokeGrant","summary":"Revoke one grant","description":"Revokes the user grant and every API key, OAuth token, handoff, and elevation lease bound to it.","security":[{"sessionCookie":[]}],"responses":{"204":{"description":"The grant was revoked."}},"parameters":[{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Account"]}},"/v1/me/oauth-consent":{"get":{"operationId":"getOAuthConsent","summary":"Get the access you approved for an app","description":"Returns the scopes and teams you already approved for one OAuth client, or null when you have not connected it. The consent page keeps those teams and shows only the access a new request adds.","security":[{"sessionCookie":[]}],"parameters":[{"name":"clientId","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"The OAuth client that asks for access."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"teams":{"anyOf":[{"type":"string","const":"all"},{"type":"array","items":{"type":"string"}}]}},"required":["id","scopes","teams"],"additionalProperties":false},{"type":"null"}]}},"required":["grant"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/grants/{grantId}/activity":{"get":{"operationId":"listGrantActivity","summary":"List one user grant's authorization activity","description":"Returns one same-user ledger across platform and hosted MCP events. The actor remains the user who authorized the grant; exact MCP clientInfo is display-only harness attribution.","security":[{"sessionCookie":[]}],"parameters":[{"name":"grantId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grantId":{"type":"string"},"authorizationLevel":{"type":"string","enum":["user","team"]},"entries":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"grantId":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"harness":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"clientInfo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["name","version"],"additionalProperties":false}},"required":["kind","clientInfo"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"source":{"type":"string","const":"platform"},"code":{"type":"string"},"message":{"type":"string"},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","grantId","actor","harness","createdAt","source","code","message","details"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"grantId":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"harness":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"clientInfo":{"type":"object","properties":{"name":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["name","version"],"additionalProperties":false}},"required":["kind","clientInfo"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"source":{"type":"string","const":"hosted_mcp"},"sessionId":{"type":"string"},"eventType":{"type":"string"},"tool":{"type":["string","null"]},"status":{"type":["string","null"]},"requestId":{"type":["string","null"]},"durationMs":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","grantId","actor","harness","createdAt","source","sessionId","eventType","tool","status","requestId","durationMs","details"],"additionalProperties":false}]}}},"required":["grantId","authorizationLevel","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/plugin-settings":{"patch":{"operationId":"updatePluginSettings","summary":"Update personal plugin settings","description":"Update the authenticated user's Space Library settings. Omitted settings retain their values. Team and service identities cannot write personal settings.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pageSize":{"type":"integer","minimum":10,"maximum":50,"description":"Number of Spaces to load per library page."},"showStatus":{"type":"boolean","description":"Show status badges in the Space Library."}},"additionalProperties":false,"minProperties":1}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pageSize":{"type":"integer","minimum":10,"maximum":50,"description":"Number of Spaces to load per library page."},"showStatus":{"type":"boolean","description":"Show status badges in the Space Library."}},"additionalProperties":false,"minProperties":1}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pageSize":{"type":"integer","minimum":10,"maximum":50,"description":"Number of Spaces to load per library page."},"showStatus":{"type":"boolean","description":"Show status badges in the Space Library."}},"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":10,"maximum":50,"description":"Number of Spaces to load per library page."},"showStatus":{"type":"boolean","description":"Show status badges in the Space Library."}},"required":["pageSize","showStatus"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"get":{"operationId":"getPluginSettings","summary":"Read personal plugin settings","description":"Read the authenticated user's Space Library settings. Team and service identities receive the default values.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":10,"maximum":50,"description":"Number of Spaces to load per library page."},"showStatus":{"type":"boolean","description":"Show status badges in the Space Library."}},"required":["pageSize","showStatus"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/dashboard-preferences":{"patch":{"operationId":"updateDashboardPreferences","summary":"Update the authenticated user's dashboard preferences","description":"Merges the body into the stored preference bag key by key and returns the full result. A key set to `null` is deleted; keys you omit are left alone. Read the current bag from `GET /v1/me`.","security":[{"sessionCookie":[]}],"requestBody":{"description":"Preference keys to merge into the stored bag. A key set to `null` is deleted; every other key is overwritten. Keys you do not send are left alone.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Preference keys to merge into the stored bag. A key set to `null` is deleted; every other key is overwritten. Keys you do not send are left alone."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Preference keys to merge into the stored bag. A key set to `null` is deleted; every other key is overwritten. Keys you do not send are left alone."}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Preference keys to merge into the stored bag. A key set to `null` is deleted; every other key is overwritten. Keys you do not send are left alone."}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Per-user dashboard preferences as an open key/value bag. Values are arbitrary JSON; each dashboard surface owns the meaning of its own key."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/privacy":{"patch":{"operationId":"updatePrivacySettings","summary":"Update the authenticated user's privacy settings","description":"Applies the given privacy choices and returns the full result. Omitted fields are left alone. Read the current settings from `GET /v1/me`. Changes are recorded in the account activity log.","security":[{"sessionCookie":[]}],"requestBody":{"description":"Fields to change; omitted fields are left alone.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"description":"Fields to change; omitted fields are left alone."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"description":"Fields to change; omitted fields are left alone."}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"description":"Fields to change; omitted fields are left alone."}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"required":["analyticsOptOut","advertisingOptOut"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/me/email-preferences":{"get":{"operationId":"getEmailPreferences","summary":"Get email notification preferences","description":"Returns the authenticated user's effective notification-topic preferences: system, invites, announcements, and offers. Delivery category and recipient preference are independent. Essential authentication mail is never preference-gated.","security":[{"sessionCookie":[]}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"system":{"type":"boolean"},"invites":{"type":"boolean"},"announcements":{"type":"boolean"},"offers":{"type":"boolean"}},"required":["system","invites","announcements","offers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"put":{"operationId":"updateEmailPreferences","summary":"Update email notification preferences","description":"Sets any subset of the recipient-controlled notification topics and returns the updated effective state.","security":[{"sessionCookie":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"system":{"type":"boolean"},"invites":{"type":"boolean"},"announcements":{"type":"boolean"},"offers":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"system":{"type":"boolean"},"invites":{"type":"boolean"},"announcements":{"type":"boolean"},"offers":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"system":{"type":"boolean"},"invites":{"type":"boolean"},"announcements":{"type":"boolean"},"offers":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"system":{"type":"boolean"},"invites":{"type":"boolean"},"announcements":{"type":"boolean"},"offers":{"type":"boolean"}},"required":["system","invites","announcements","offers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/operations":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listOperations","summary":"List operations","description":"Returns your workflow operations, newest first. The feed includes publishes, builds, domain and webhook activity, integration releases, agent runs, and approvals. Internal system operations stay out of this feed. Operations your credential cannot reach stay out of this feed. Filter by resource to follow one thread, or by `spaceId` for everything about one Space.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"resourceType","in":"query","required":false,"schema":{"description":"Filter to operations touching one resource type, for example `space`.","type":"string","minLength":1}},{"name":"resourceId","in":"query","required":false,"schema":{"description":"Filter to operations touching one resource.","type":"string","minLength":1}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Filter to operations for one Space: its own operations plus those of its versions and builds. The Space must be readable by the caller.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["version_finalize","version_promote_live","version_delete","build_start","domain_check","domain_ssl_retry","domain_registration_submit","domain_transfer_submit","domain_dns_apply","domain_lifecycle","webhook_deliver","integration_release"]},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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))$"},"versionSource":{"description":"Version provenance for version operations; settings marks a settings publish, while direct_upload and git mark content publishes. Omitted for legacy rows.","type":"string","enum":["direct_upload","git","settings"]},"integrationRelease":{"description":"Release environment for an integration tag pointer flip.","type":"object","properties":{"environment":{"type":"string","enum":["production","preview","development"]}},"required":["environment"],"additionalProperties":false}},"required":["id","kind","status","resources","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/operations/{operationId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getOperation","summary":"Get an operation","description":"Returns one asynchronous operation's status, progress, and outcome. Poll this endpoint after a mutation that returns an operation handle.","parameters":[{"name":"operationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/operation-reads/{capability}":{"get":{"security":[],"operationId":"readAnonymousPublishOperation","summary":"Read an anonymous publish operation","description":"Returns one anonymous publish operation through the read-only URL in its publish receipt. The URL expires and grants no Space access.","parameters":[{"name":"capability","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/notifications":{"get":{"security":[{"sessionCookie":[]}],"operationId":"listNotifications","summary":"List dashboard notifications","description":"Returns the signed-in user's notifications, newest first.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"unread","in":"query","required":false,"schema":{"description":"Return only notifications that have not been read yet.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comment.created","comment.replied","thread.archived","thread.unarchived","mention","approval.requested","team.joinable"]},"teamId":{"type":["string","null"]},"spaceId":{"type":["string","null"]},"threadId":{"type":["string","null"]},"title":{"type":"string"},"body":{"type":["string","null"]},"actor":{"type":"object","properties":{"name":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]},"color":{"type":["string","null"]}},"required":["name","avatarUrl","color"],"additionalProperties":false},"path":{"type":["string","null"]},"versionId":{"type":["string","null"]},"link":{"type":["string","null"]},"readAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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","kind","teamId","spaceId","threadId","title","body","actor","path","versionId","link","readAt","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/notifications/unread-count":{"get":{"security":[{"sessionCookie":[]}],"operationId":"getNotificationUnreadCount","summary":"Count unread dashboard notifications","description":"Returns the number of unread notifications owned by the signed-in user.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/notifications/read":{"post":{"security":[{"sessionCookie":[]}],"operationId":"markNotificationsRead","summary":"Mark dashboard notifications read","description":"Marks selected notifications, or every notification, as read for the signed-in user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"updated":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/spaces/{spaceId}/collaboration/notify-email":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceCollaborationNotifyEmail","summary":"Opt an anonymous commenter into reply email","description":"Requires a current anonymous Comments bearer and verifies the Cast actor belongs to it. Mails a confirmation link to the address; reply email starts only after the address owner confirms.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"castActorId":{"type":"string","minLength":1,"maxLength":128},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["castActorId","email"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"castActorId":{"type":"string","minLength":1,"maxLength":128},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["castActorId","email"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"castActorId":{"type":"string","minLength":1,"maxLength":128},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["castActorId","email"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"subscribed":{"type":"boolean","const":true},"consentAt":{"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":["subscribed","consentAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/versions":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersions","summary":"List a space's versions","description":"Lists space versions, newest first. Each item includes its status, number, and permanent Version URL.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"gitCommitSha","in":"query","required":false,"schema":{"description":"Only versions built from this exact git commit.","type":"string","pattern":"^[0-9a-f]{40}$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ref":{"description":"Human ref \"v{number}\"; null until the version reaches ready.","type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spaceId":{"type":"string"},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"publisher":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","partner_token","oauth_client","anonymous_claim","system"],"description":"The type of actor that published the version."},"displayName":{"type":"string","description":"The display name of the person, agent, or system that published the version."},"avatarUrl":{"description":"The publisher's avatar URL. The value is null when no avatar exists.","type":["string","null"]},"authorizedBy":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string","description":"The person's display name."},"avatarUrl":{"description":"The person's avatar URL. The value is null when no avatar exists.","type":["string","null"]}},"required":["displayName","avatarUrl"],"additionalProperties":false},{"type":"null"}],"description":"The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizing person."}},"required":["type","displayName","avatarUrl","authorizedBy"],"additionalProperties":false},{"type":"null"}],"description":"The actor that published the version. The value is null for a legacy version with no attribution."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"type":["string","null"]},"failureMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"]},"manifestHash":{"type":["string","null"]},"buildId":{"type":["string","null"]},"gitCommitSha":{"description":"Commit the build for this version was made from; null for direct uploads.","type":["string","null"]},"importedFromVersionId":{"type":["string","null"]},"variables":{"type":"null","description":"Variable dependency provenance is not publicly exposed."},"fileCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"totalBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"filesAddedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version added against the version it replaced."},"filesChangedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths whose bytes changed against the version this one replaced."},"filesRemovedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version removed against the version it replaced."},"pendingUploads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"],"additionalProperties":false}},"skippedPaths":{"type":"array","items":{"type":"string"}},"immutableUrl":{"description":"Permanent version URL ({label}--v{number}.space.fast form, under the space's own apex), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready.","type":["string","null"]},"immutableUrlStatus":{"anyOf":[{"type":"string","enum":["pending","ready"]},{"type":"null"}],"description":"Whether the immutable version URL is ready. pending means the URL might not resolve yet."},"isCurrentProduction":{"type":"boolean"},"siteTitle":{"type":"string"},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"SpaceConfig overlay snapshot the version was finalized with."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"headersRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redirectsRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxyRouteCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"crons":{"description":"Cron declarations frozen at finalize, independent of worker presence. Included when inspecting a version; omitted from version lists.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable identifier for this entry, derived from its path."},"path":{"type":"string","description":"Path on this space that gets requested."},"schedule":{"type":"string","description":"Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."}},"required":["key","path","schedule"],"additionalProperties":false}},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]},"id":{"type":"string"},"versionId":{"type":"string"},"createdAt":{"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":["code","severity","message","id","versionId","createdAt"],"additionalProperties":false}},"createdAt":{"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))$"},"readyAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"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","ref","number","spaceId","source","publisher","status","failureCode","failureMessage","failedStage","manifestHash","buildId","gitCommitSha","importedFromVersionId","variables","fileCount","totalBytes","filesAddedCount","filesChangedCount","filesRemovedCount","pendingUploads","skippedPaths","immutableUrl","immutableUrlStatus","isCurrentProduction","siteTitle","config","operation","headersRuleCount","redirectsRuleCount","proxyRouteCount","runtimeCodeDetected","buildLog","diagnostics","createdAt","readyAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]},"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"createSpaceVersion","summary":"Start a new version upload","description":"Creates a version and returns upload instructions. The declared file manifest drives change-only uploads: unchanged files are retained from the previous version and only the remainder is requested.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"description":"Publish provenance recorded on the version; defaults to {kind: \"direct_upload\"}.","type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"]},"publishMode":{"default":"additive","description":"How to interpret omitted paths in `files`: `additive` retains existing paths unless explicitly replaced; `snapshot` treats `files` as the complete desired manifest.","type":"string","enum":["additive","snapshot"]},"sourceMetadata":{"description":"Additional control-plane-only provenance for build and deploy read models.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"buildLog":{"description":"Build transcript truncated to a bounded size for deploys that ran a local build before publishing.","type":"string","maxLength":524288},"finalize":{"description":"Finalize intent for a declared upload. The version finalizes itself once Spacefast confirms every declared file landed: at create when nothing needs uploading, otherwise on the `uploads/refresh` call that finds nothing pending. Call refresh after the last upload. The explicit finalize call remains available for recovery and replay.","type":"object","properties":{"channel":{"anyOf":[{"type":"string","enum":["live","production"]},{"type":"null"}]}}},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"description":"Optional content type for serving metadata.","type":"string"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"]},"description":"The complete desired file manifest. `sha256` is optional: omit it to upload by path and let the runtime hash the bytes, or include it to upload by content address, with the digest verified as the bytes land. A `sourceUrl` entry is fetched and hashed by the runtime."},"configOnly":{"description":"Recompile the configuration on top of the current ready artifact without replacing content: the file catalog carries forward, Functions/Zero declarations and runtime detection are preserved, and the version records a `config_update` source. `files` may name only `sf.jsonc` (the shipped configuration); every other path keeps the current version's bytes. Requires an existing ready version to carry forward. Runtime changes still need a normal content publish.","type":"boolean"},"deletePaths":{"default":[],"description":"Explicit paths to remove when `publishMode` is additive. Omitted paths are retained. Only listed paths are deleted.","type":"array","items":{"type":"string","minLength":1}},"immutableAssetPrefixes":{"description":"Publisher-owned directory prefixes whose declared files are immutable generation assets. Snapshot publishes retain the matching files from the current generation for exactly one subsequent generation.","type":"array","items":{"type":"string","minLength":2}}},"required":["files"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ignoredPaths":{"description":"Deprecated; current servers return an empty array.","type":"array","items":{"type":"string"}},"versionId":{"description":"Created version id, or null when the manifest matched and nothing changed.","type":["string","null"]},"upload":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}],"description":"Runtime upload session; present only while bytes still need uploading. Upload first, then finalize."}},"required":["versionId","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ignoredPaths":{"description":"Deprecated; current servers return an empty array.","type":"array","items":{"type":"string"}},"versionId":{"description":"Created version id, or null when the manifest matched and nothing changed.","type":["string","null"]},"upload":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}],"description":"Runtime upload session; present only while bytes still need uploading. Upload first, then finalize."}},"required":["versionId","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/compare":{"get":{"security":[{"bearerAuth":[]}],"operationId":"compareSpaceDeploymentVersions","summary":"Compare deployment files","description":"Compare the served files of two completed deployment versions. This does not compare Git source. File contents require versions:download access. Binary, oversized, or unavailable contents include a reason instead of a partial diff.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"baseVersionId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"ID of the earlier deployment version."}},{"name":"versionId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"ID of the deployment version to compare."}},{"name":"path","in":"query","required":false,"schema":{"description":"Read before-and-after text for this file path. Requires versions:download access.","type":"string","minLength":1,"maxLength":1024}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Copy the next cursor from this exact version comparison.","type":"string","maxLength":4000}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"description":"Maximum changed paths to return.","type":"integer","minimum":1,"maximum":250}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"view":{"type":"string","const":"served"},"baseDeploymentVersionId":{"type":"string"},"deploymentVersionId":{"type":"string"},"baseVersionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"versionNumber":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"stats":{"type":"object","properties":{"files":{"type":"integer","minimum":0,"maximum":9007199254740991},"added":{"type":"integer","minimum":0,"maximum":9007199254740991},"modified":{"type":"integer","minimum":0,"maximum":9007199254740991},"deleted":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["files","added","modified","deleted"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"state":{"type":"string","enum":["added","modified","deleted"]},"before":{"anyOf":[{"type":"object","properties":{"sha256":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentType":{"type":["string","null"]}},"required":["sha256","size","contentType"],"additionalProperties":false},{"type":"null"}]},"after":{"anyOf":[{"type":"object","properties":{"sha256":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentType":{"type":["string","null"]}},"required":["sha256","size","contentType"],"additionalProperties":false},{"type":"null"}]}},"required":["path","state","before","after"],"additionalProperties":false}},"file":{"anyOf":[{"type":"object","properties":{"path":{"type":"string"},"before":{"type":["string","null"]},"after":{"type":["string","null"]},"beforeReason":{"anyOf":[{"type":"string","enum":["not_present","binary","too_large","unavailable"]},{"type":"null"}]},"afterReason":{"anyOf":[{"type":"string","enum":["not_present","binary","too_large","unavailable"]},{"type":"null"}]}},"required":["path","before","after","beforeReason","afterReason"],"additionalProperties":false},{"type":"null"}]},"sourceComparison":{"anyOf":[{"type":"object","properties":{"repositoryId":{"type":"string"},"baseSourceCommitSha":{"type":"string"},"sourceCommitSha":{"type":"string"}},"required":["repositoryId","baseSourceCommitSha","sourceCommitSha"],"additionalProperties":false},{"type":"null"}]},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["spaceId","view","baseDeploymentVersionId","deploymentVersionId","baseVersionNumber","versionNumber","stats","files","file","sourceComparison","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/uploads/refresh":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"refreshSpaceVersionUpload","summary":"Refresh a draft version's upload instructions","description":"Mints a fresh upload session for an unfinished version and lists only the files the runtime has not received yet, so an interrupted upload can continue where it stopped.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ignoredPaths":{"description":"Deprecated; current servers return an empty array.","type":"array","items":{"type":"string"}},"versionId":{"type":"string"},"upload":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}],"description":"Fresh runtime upload session; present only while files still need uploading. Upload first, then finalize."}},"required":["versionId","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/logs":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersionLogs","summary":"Read a version's publish log","description":"Returns the version's publish and finalize log entries for debugging a publish.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"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))$","description":"Instant when the version last changed state."},"level":{"type":"string","description":"Log severity: info or error."},"code":{"type":"string","description":"Stable version.{status} code for the line."},"message":{"type":"string","description":"Human-readable log line."}},"required":["timestamp","level","code","message"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceVersion","summary":"Get a version","description":"Returns one version with its status, number, permanent Version URL, and diagnostics.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"ref":{"description":"Human ref \"v{number}\"; null until the version reaches ready.","type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spaceId":{"type":"string"},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"publisher":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","partner_token","oauth_client","anonymous_claim","system"],"description":"The type of actor that published the version."},"displayName":{"type":"string","description":"The display name of the person, agent, or system that published the version."},"avatarUrl":{"description":"The publisher's avatar URL. The value is null when no avatar exists.","type":["string","null"]},"authorizedBy":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string","description":"The person's display name."},"avatarUrl":{"description":"The person's avatar URL. The value is null when no avatar exists.","type":["string","null"]}},"required":["displayName","avatarUrl"],"additionalProperties":false},{"type":"null"}],"description":"The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizing person."}},"required":["type","displayName","avatarUrl","authorizedBy"],"additionalProperties":false},{"type":"null"}],"description":"The actor that published the version. The value is null for a legacy version with no attribution."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"type":["string","null"]},"failureMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"]},"manifestHash":{"type":["string","null"]},"buildId":{"type":["string","null"]},"gitCommitSha":{"description":"Commit the build for this version was made from; null for direct uploads.","type":["string","null"]},"importedFromVersionId":{"type":["string","null"]},"variables":{"type":"null","description":"Variable dependency provenance is not publicly exposed."},"fileCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"totalBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"filesAddedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version added against the version it replaced."},"filesChangedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths whose bytes changed against the version this one replaced."},"filesRemovedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version removed against the version it replaced."},"pendingUploads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"],"additionalProperties":false}},"skippedPaths":{"type":"array","items":{"type":"string"}},"immutableUrl":{"description":"Permanent version URL ({label}--v{number}.space.fast form, under the space's own apex), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready.","type":["string","null"]},"immutableUrlStatus":{"anyOf":[{"type":"string","enum":["pending","ready"]},{"type":"null"}],"description":"Whether the immutable version URL is ready. pending means the URL might not resolve yet."},"isCurrentProduction":{"type":"boolean"},"siteTitle":{"type":"string"},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"SpaceConfig overlay snapshot the version was finalized with."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"headersRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redirectsRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxyRouteCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"crons":{"description":"Cron declarations frozen at finalize, independent of worker presence. Included when inspecting a version; omitted from version lists.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable identifier for this entry, derived from its path."},"path":{"type":"string","description":"Path on this space that gets requested."},"schedule":{"type":"string","description":"Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."}},"required":["key","path","schedule"],"additionalProperties":false}},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]},"id":{"type":"string"},"versionId":{"type":"string"},"createdAt":{"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":["code","severity","message","id","versionId","createdAt"],"additionalProperties":false}},"createdAt":{"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))$"},"readyAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"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","ref","number","spaceId","source","publisher","status","failureCode","failureMessage","failedStage","manifestHash","buildId","gitCommitSha","importedFromVersionId","variables","fileCount","totalBytes","filesAddedCount","filesChangedCount","filesRemovedCount","pendingUploads","skippedPaths","immutableUrl","immutableUrlStatus","isCurrentProduction","siteTitle","config","operation","headersRuleCount","redirectsRuleCount","proxyRouteCount","runtimeCodeDetected","buildLog","diagnostics","createdAt","readyAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]},"delete":{"security":[{"bearerAuth":[]}],"operationId":"deleteSpaceVersion","summary":"Delete a version","description":"Permanently deletes a version and its files. Versions referenced by a channel cannot be deleted; promote another version first. A publishing API key without version-administration permission may delete only versions that same key created.","responses":{"204":{"description":"The version was deleted."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Versions"]}},"/v1/spaces/{spaceId}/files":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceFiles","summary":"List a space's live files","description":"Returns the live channel's file index, read from the runtime's own file catalog. No separate file database is required.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"description":"Return only files whose path contains this text.","type":"string","minLength":1,"maxLength":255}},{"name":"view","in":"query","required":false,"schema":{"description":"Which catalog to list: `uploaded` (the default) is what the publisher uploaded before any transform; `served` is what this version actually answers with.","type":"string","enum":["uploaded","served"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"channel":{"type":"string","const":"live"},"versionId":{"type":["string","null"]},"view":{"type":"string","enum":["uploaded","served"]},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"description":"Optional content type for serving metadata.","type":"string"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["path","size","previewable","generatedPreview"],"additionalProperties":false}},"index":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}},"byHash":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}},"byPath":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}}},"required":["entries","byHash","byPath"],"additionalProperties":false},"search":{"type":"object","properties":{"query":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["query","total","matched"],"additionalProperties":false}},"required":["channel","versionId","view","files","index","search"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/versions/{versionId}/files":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersionFiles","summary":"List a version's files","description":"Returns the version's source files with paths, sizes, and content hashes, read from the runtime's file catalog.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"description":"Return only files whose path contains this text.","type":"string","minLength":1,"maxLength":255}},{"name":"view","in":"query","required":false,"schema":{"description":"Which catalog to list: `uploaded` (the default) is what the publisher uploaded before any transform; `served` is what this version actually answers with.","type":"string","enum":["uploaded","served"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string"},"view":{"type":"string","enum":["uploaded","served"]},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"description":"Optional content type for serving metadata.","type":"string"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]}},"required":["path","size","previewable","generatedPreview"],"additionalProperties":false}},"index":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}},"byHash":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}},"byPath":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"key":{"type":"string"},"selector":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"hash"},"sha256":{"type":"string"}},"required":["kind","sha256"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"path"},"path":{"type":"string"}},"required":["kind","path"],"additionalProperties":false}]},"primaryPath":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentTypes":{"type":"array","items":{"type":"string"}},"previewable":{"type":"boolean"},"generatedPreview":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"image"},"status":{"type":"string","enum":["ready","pending"]},"key":{"type":"string"},"cacheScope":{"type":"string","enum":["hash","version-path"]},"contentType":{"type":"string","const":"image/webp"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","status","key","cacheScope","contentType","width","height"],"additionalProperties":false},{"type":"null"}]},"searchText":{"type":"string"}},"required":["key","selector","primaryPath","paths","count","size","totalBytes","contentTypes","previewable","generatedPreview","searchText"],"additionalProperties":false}}},"required":["entries","byHash","byPath"],"additionalProperties":false},"search":{"type":"object","properties":{"query":{"type":["string","null"]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["query","total","matched"],"additionalProperties":false}},"required":["versionId","view","files","index","search"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/files/links":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersionFileLinks","summary":"Mint read links for a version's files","description":"Authorizes the caller once and returns one short-lived signed URL per requested path. Repeat the path parameter per file, up to 200 per request. Minting creates nothing — fetch the URLs directly; file bytes never travel through the API. A path this version does not hold answers version_file_not_found when its link is followed.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":true,"schema":{"description":"Version-relative file paths to mint read links for; repeat the parameter per path.","minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1}}},{"name":"view","in":"query","required":false,"schema":{"default":"uploaded","description":"Which representation to read: `uploaded` is the byte the publisher uploaded before any transform; `served` is the immutable byte this version answers with.","type":"string","enum":["uploaded","served"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string"},"view":{"type":"string","enum":["uploaded","served"]},"links":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Short-lived signed URL that serves the file's bytes."},"expiresAt":{"type":"string","description":"When the link stops working."}},"required":["url","expiresAt"],"additionalProperties":false}}},"required":["versionId","view","links"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/preview-session":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceVersionPreviewSession","summary":"Open a version in a preview session","description":"Mints a short-lived URL that opens one page of this version — including a private one — with its stylesheets, scripts and images authorized too. The URL is meant to be framed: following it once exchanges the proof it carries for a cookie on the version's own origin and redirects to the same page without it, so the framed document holds no secret. The session authorizes that version only. Requires the same permission as minting a file link.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page to open in the preview. Defaults to the version's root.","type":"string","minLength":1,"maxLength":1024}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page to open in the preview. Defaults to the version's root.","type":"string","minLength":1,"maxLength":1024}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page to open in the preview. Defaults to the version's root.","type":"string","minLength":1,"maxLength":1024}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string"},"origin":{"type":"string","format":"uri"},"landingPath":{"type":"string"},"url":{"type":"string","format":"uri","description":"Frame this URL. Following it once exchanges the proof it carries for a cookie and redirects to the same page without it."},"expiresAt":{"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))$","description":"When the preview session stops working."}},"required":["versionId","origin","landingPath","url","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/convention-artifacts":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersionConventionArtifacts","summary":"List a version's convention artifacts","description":"Returns the compiled _redirects and _headers artifacts the runtime serves for this version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string"},"artifacts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["redirects","headers"]},"path":{"type":"string","enum":["_redirects","_headers"]},"source":{"type":"string","enum":["uploaded","inherited","override","generated","missing"]},"present":{"type":"boolean"},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":["string","null"]},"contentType":{"type":["string","null"]},"compiledRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"warningCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"errorCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","path","source","present","size","sha256","contentType","compiledRuleCount","warningCount","errorCount"],"additionalProperties":false}}},"required":["versionId","artifacts"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/convention-artifacts/content":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceVersionConventionArtifactContent","summary":"Read a convention artifact's content","description":"Returns the compiled content of one convention artifact (_redirects or _headers) for this version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"schema":{"description":"Which artifact to read, named by kind. Pass this or `path`.","type":"string","enum":["redirects","headers"]}},{"name":"path","in":"query","required":false,"schema":{"description":"Which artifact to read, named by its source path. Pass this or `kind`.","type":"string","enum":["_redirects","_headers"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"kind":{"type":"string","enum":["redirects","headers"]},"path":{"type":"string","enum":["_redirects","_headers"]},"source":{"type":"string","enum":["uploaded","inherited","override","generated","missing"]},"present":{"type":"boolean"},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":["string","null"]},"contentType":{"type":["string","null"]},"compiledRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"warningCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"errorCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"encoding":{"type":"string","enum":["utf8","base64"]},"content":{"type":"string"},"truncated":{"type":"boolean"}},"required":["kind","path","source","present","size","sha256","contentType","compiledRuleCount","warningCount","errorCount","encoding","content","truncated"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/routing-summary":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceVersionRoutingSummary","summary":"Get a version's routing summary","description":"Returns the routing rule counts and diagnostics the runtime reported when it compiled and finalized this version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string"},"source":{"type":"object","properties":{"artifacts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["redirects","headers"]},"path":{"type":"string","enum":["_redirects","_headers"]},"source":{"type":"string","enum":["uploaded","inherited","override","generated","missing"]},"present":{"type":"boolean"},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"sha256":{"type":["string","null"]},"contentType":{"type":["string","null"]},"compiledRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"warningCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"errorCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","path","source","present","size","sha256","contentType","compiledRuleCount","warningCount","errorCount"],"additionalProperties":false}}},"required":["artifacts"],"additionalProperties":false},"compiled":{"type":"object","properties":{"redirectRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"headerRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"proxyRuleCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["redirectRuleCount","headerRuleCount","proxyRuleCount"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string","enum":["_redirects","_headers","sf.overlay","sf.jsonc","spacefast.jsonc","spacefast.json","sf.json",".sf/sf.json",".sf/config.jsonc",".sf/config.json"]},"line":{"type":"integer","minimum":0,"maximum":9007199254740991},"severity":{"type":"string","enum":["warning","error"]},"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"},"deferredUntilSubstitution":{"type":"boolean","const":true}},"required":["file","line","severity","code","message","source"],"additionalProperties":false}}},"required":["versionId","source","compiled","diagnostics"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/finalize":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"finalizeSpaceVersion","summary":"Finalize a version","description":"Compiles and activates an uploaded version. Waits for completion by default. Pass `async=1` to get an operation handle to poll instead.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"async","in":"query","required":false,"schema":{"description":"Finalize in the background and return the operation handle instead of waiting (true/1).","type":"string","enum":["0","1","true","false"]}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key, at most 255 characters, that makes this write safe to retry. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it `Idempotency-Replayed: true`. A request that reuses a key with a different body fails with 409 `idempotency_key_reused`. A duplicate request that arrives while the first is still in flight fails with 409 `idempotency_conflict_in_progress`. The server keeps each key for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Omit for live publish, use production as an alias for live, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live","production"]},{"type":"null"}]}}},"example":{"channel":"live"}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Omit for live publish, use production as an alias for live, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live","production"]},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Omit for live publish, use production as an alias for live, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live","production"]},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"ref":{"description":"Human ref \"v{number}\"; null until the version reaches ready.","type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spaceId":{"type":"string"},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"publisher":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","partner_token","oauth_client","anonymous_claim","system"],"description":"The type of actor that published the version."},"displayName":{"type":"string","description":"The display name of the person, agent, or system that published the version."},"avatarUrl":{"description":"The publisher's avatar URL. The value is null when no avatar exists.","type":["string","null"]},"authorizedBy":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string","description":"The person's display name."},"avatarUrl":{"description":"The person's avatar URL. The value is null when no avatar exists.","type":["string","null"]}},"required":["displayName","avatarUrl"],"additionalProperties":false},{"type":"null"}],"description":"The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizing person."}},"required":["type","displayName","avatarUrl","authorizedBy"],"additionalProperties":false},{"type":"null"}],"description":"The actor that published the version. The value is null for a legacy version with no attribution."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"type":["string","null"]},"failureMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"]},"manifestHash":{"type":["string","null"]},"buildId":{"type":["string","null"]},"gitCommitSha":{"description":"Commit the build for this version was made from; null for direct uploads.","type":["string","null"]},"importedFromVersionId":{"type":["string","null"]},"variables":{"type":"null","description":"Variable dependency provenance is not publicly exposed."},"fileCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"totalBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"filesAddedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version added against the version it replaced."},"filesChangedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths whose bytes changed against the version this one replaced."},"filesRemovedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version removed against the version it replaced."},"pendingUploads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"],"additionalProperties":false}},"skippedPaths":{"type":"array","items":{"type":"string"}},"immutableUrl":{"description":"Permanent version URL ({label}--v{number}.space.fast form, under the space's own apex), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready.","type":["string","null"]},"immutableUrlStatus":{"anyOf":[{"type":"string","enum":["pending","ready"]},{"type":"null"}],"description":"Whether the immutable version URL is ready. pending means the URL might not resolve yet."},"isCurrentProduction":{"type":"boolean"},"siteTitle":{"type":"string"},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"SpaceConfig overlay snapshot the version was finalized with."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"headersRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redirectsRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxyRouteCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"crons":{"description":"Cron declarations frozen at finalize, independent of worker presence. Included when inspecting a version; omitted from version lists.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable identifier for this entry, derived from its path."},"path":{"type":"string","description":"Path on this space that gets requested."},"schedule":{"type":"string","description":"Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."}},"required":["key","path","schedule"],"additionalProperties":false}},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]},"id":{"type":"string"},"versionId":{"type":"string"},"createdAt":{"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":["code","severity","message","id","versionId","createdAt"],"additionalProperties":false}},"createdAt":{"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))$"},"readyAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"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","ref","number","spaceId","source","publisher","status","failureCode","failureMessage","failedStage","manifestHash","buildId","gitCommitSha","importedFromVersionId","variables","fileCount","totalBytes","filesAddedCount","filesChangedCount","filesRemovedCount","pendingUploads","skippedPaths","immutableUrl","immutableUrlStatus","isCurrentProduction","siteTitle","config","operation","headersRuleCount","redirectsRuleCount","proxyRouteCount","runtimeCodeDetected","buildLog","diagnostics","createdAt","readyAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false},"examples":{"synchronous":{"summary":"Finalize waited for the version and returned it ready.","value":{"data":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"spaceId":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","source":{"kind":"direct_upload","client":"spacefast-cli/1.4.0","message":"Initial launch"},"status":"ready","failureCode":null,"failureMessage":null,"failedStage":null,"manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","buildId":null,"gitCommitSha":null,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://marketing-site--v1.space.fast/","isCurrentProduction":true,"siteTitle":"Marketing site","config":null,"operation":null,"headersRuleCount":0,"redirectsRuleCount":0,"proxyRouteCount":0,"runtimeCodeDetected":false,"buildLog":null,"diagnostics":[],"createdAt":"2026-06-30T12:00:00.000Z","readyAt":"2026-06-30T12:00:03.000Z","updatedAt":"2026-06-30T12:00:03.000Z"},"operation":null}},"asynchronous":{"summary":"`async=1`: the version as accepted, plus the operation to poll.","value":{"data":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"spaceId":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","source":{"kind":"direct_upload","client":"spacefast-cli/1.4.0","message":"Initial launch"},"status":"finalizing","failureCode":null,"failureMessage":null,"failedStage":null,"manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","buildId":null,"gitCommitSha":null,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://marketing-site--v1.space.fast/","isCurrentProduction":false,"siteTitle":"Marketing site","config":null,"operation":{"id":"op_5e2c9b7a13d846f0a8b5c1e7d92f6403","kind":"version_finalize","status":"queued","resources":[{"type":"version","id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c"},{"type":"space","id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c"}],"createdAt":"2026-06-30T12:00:01.000Z"},"headersRuleCount":0,"redirectsRuleCount":0,"proxyRouteCount":0,"runtimeCodeDetected":false,"buildLog":null,"diagnostics":[],"createdAt":"2026-06-30T12:00:00.000Z","readyAt":null,"updatedAt":"2026-06-30T12:00:03.000Z"},"operation":{"id":"op_5e2c9b7a13d846f0a8b5c1e7d92f6403","kind":"version_finalize","status":"queued","resources":[{"type":"version","id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c"},{"type":"space","id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c"}],"createdAt":"2026-06-30T12:00:01.000Z"}}}}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/promote":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"promoteSpaceVersion","summary":"Promote a version","description":"Promotes a ready version to a channel (`live` by default). Use this for rollback: promote any earlier ready version. Waits for completion by default. Pass `async=1` to get an operation handle to poll instead.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"async","in":"query","required":false,"schema":{"description":"Promote in the background and return the operation handle instead of waiting (true/1).","type":"string","enum":["0","1","true","false"]}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key, at most 255 characters, that makes this write safe to retry. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it `Idempotency-Replayed: true`. A request that reuses a key with a different body fails with 409 `idempotency_key_reused`. A duplicate request that arrives while the first is still in flight fails with 409 `idempotency_conflict_in_progress`. The server keeps each key for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Channel to point at this version. Defaults to \"live\". Non-live channel names are rejected with `channel_unsupported` until additional channels ship.","type":"string","minLength":1}}},"example":{"channel":"live"}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Channel to point at this version. Defaults to \"live\". Non-live channel names are rejected with `channel_unsupported` until additional channels ship.","type":"string","minLength":1}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Channel to point at this version. Defaults to \"live\". Non-live channel names are rejected with `channel_unsupported` until additional channels ship.","type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"ref":{"description":"Human ref \"v{number}\"; null until the version reaches ready.","type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"spaceId":{"type":"string"},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"publisher":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","partner_token","oauth_client","anonymous_claim","system"],"description":"The type of actor that published the version."},"displayName":{"type":"string","description":"The display name of the person, agent, or system that published the version."},"avatarUrl":{"description":"The publisher's avatar URL. The value is null when no avatar exists.","type":["string","null"]},"authorizedBy":{"anyOf":[{"type":"object","properties":{"displayName":{"type":"string","description":"The person's display name."},"avatarUrl":{"description":"The person's avatar URL. The value is null when no avatar exists.","type":["string","null"]}},"required":["displayName","avatarUrl"],"additionalProperties":false},{"type":"null"}],"description":"The person who authorized the publisher. The value is null when the publisher is a person or has no known authorizing person."}},"required":["type","displayName","avatarUrl","authorizedBy"],"additionalProperties":false},{"type":"null"}],"description":"The actor that published the version. The value is null for a legacy version with no attribution."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"type":["string","null"]},"failureMessage":{"type":["string","null"]},"failedStage":{"type":["string","null"]},"manifestHash":{"type":["string","null"]},"buildId":{"type":["string","null"]},"gitCommitSha":{"description":"Commit the build for this version was made from; null for direct uploads.","type":["string","null"]},"importedFromVersionId":{"type":["string","null"]},"variables":{"type":"null","description":"Variable dependency provenance is not publicly exposed."},"fileCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"totalBytes":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"filesAddedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version added against the version it replaced."},"filesChangedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths whose bytes changed against the version this one replaced."},"filesRemovedCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Paths this version removed against the version it replaced."},"pendingUploads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"],"additionalProperties":false}},"skippedPaths":{"type":"array","items":{"type":"string"}},"immutableUrl":{"description":"Permanent version URL ({label}--v{number}.space.fast form, under the space's own apex), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready.","type":["string","null"]},"immutableUrlStatus":{"anyOf":[{"type":"string","enum":["pending","ready"]},{"type":"null"}],"description":"Whether the immutable version URL is ready. pending means the URL might not resolve yet."},"isCurrentProduction":{"type":"boolean"},"siteTitle":{"type":"string"},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"SpaceConfig overlay snapshot the version was finalized with."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"headersRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redirectsRuleCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxyRouteCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"crons":{"description":"Cron declarations frozen at finalize, independent of worker presence. Included when inspecting a version; omitted from version lists.","type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable identifier for this entry, derived from its path."},"path":{"type":"string","description":"Path on this space that gets requested."},"schedule":{"type":"string","description":"Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."}},"required":["key","path","schedule"],"additionalProperties":false}},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]},"id":{"type":"string"},"versionId":{"type":"string"},"createdAt":{"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":["code","severity","message","id","versionId","createdAt"],"additionalProperties":false}},"createdAt":{"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))$"},"readyAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"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","ref","number","spaceId","source","publisher","status","failureCode","failureMessage","failedStage","manifestHash","buildId","gitCommitSha","importedFromVersionId","variables","fileCount","totalBytes","filesAddedCount","filesChangedCount","filesRemovedCount","pendingUploads","skippedPaths","immutableUrl","immutableUrlStatus","isCurrentProduction","siteTitle","config","operation","headersRuleCount","redirectsRuleCount","proxyRouteCount","runtimeCodeDetected","buildLog","diagnostics","createdAt","readyAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false},"examples":{"synchronous":{"summary":"Promote waited for the channel to move and returned the live version.","value":{"data":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"spaceId":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","source":{"kind":"direct_upload","client":"spacefast-cli/1.4.0","message":"Initial launch"},"status":"ready","failureCode":null,"failureMessage":null,"failedStage":null,"manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","buildId":null,"gitCommitSha":null,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://marketing-site--v1.space.fast/","isCurrentProduction":true,"siteTitle":"Marketing site","config":null,"operation":null,"headersRuleCount":0,"redirectsRuleCount":0,"proxyRouteCount":0,"runtimeCodeDetected":false,"buildLog":null,"diagnostics":[],"createdAt":"2026-06-30T12:00:00.000Z","readyAt":"2026-06-30T12:00:03.000Z","updatedAt":"2026-06-30T12:00:03.000Z"},"operation":null}},"asynchronous":{"summary":"`async=1`: the version as accepted, plus the operation to poll.","value":{"data":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"spaceId":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","source":{"kind":"direct_upload","client":"spacefast-cli/1.4.0","message":"Initial launch"},"status":"finalizing","failureCode":null,"failureMessage":null,"failedStage":null,"manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","buildId":null,"gitCommitSha":null,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://marketing-site--v1.space.fast/","isCurrentProduction":false,"siteTitle":"Marketing site","config":null,"operation":{"id":"op_5e2c9b7a13d846f0a8b5c1e7d92f6403","kind":"version_promote_live","status":"queued","resources":[{"type":"version","id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c"},{"type":"space","id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c"}],"createdAt":"2026-06-30T12:00:01.000Z"},"headersRuleCount":0,"redirectsRuleCount":0,"proxyRouteCount":0,"runtimeCodeDetected":false,"buildLog":null,"diagnostics":[],"createdAt":"2026-06-30T12:00:00.000Z","readyAt":null,"updatedAt":"2026-06-30T12:00:03.000Z"},"operation":{"id":"op_5e2c9b7a13d846f0a8b5c1e7d92f6403","kind":"version_promote_live","status":"queued","resources":[{"type":"version","id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c"},{"type":"space","id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c"}],"createdAt":"2026-06-30T12:00:01.000Z"}}}}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/visual-preview":{"get":{"operationId":"getSpaceVisualPreview","security":[{"bearerAuth":[]}],"summary":"Read a deployed version for visual review","description":"Read one deployed version for this Space. Omit versionId to select the current deployment. The response pins the review target to that version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"query","required":false,"schema":{"type":"string"}},{"name":"landingPath","in":"query","required":false,"schema":{"default":"/","type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"versionId":{"type":"string"},"sourceCommitSha":{"type":["string","null"]},"origin":{"type":"string","format":"uri"},"landingPath":{"type":"string"}},"required":["space","versionId","sourceCommitSha","origin","landingPath"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/versions/{versionId}/visual-screenshot":{"get":{"operationId":"getSpaceVersionVisualScreenshot","security":[{"bearerAuth":[]}],"summary":"Read an initial page screenshot","description":"The screenshot shows a separate page load. It does not show the user's interactive review state. Retry a pending screenshot later.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"landingPath","in":"query","required":false,"schema":{"default":"/","type":"string","minLength":1,"maxLength":1024}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["ready","pending","unavailable"]},"mimeType":{"type":"string","const":"image/jpeg"},"data":{"type":"string"},"description":{"type":"string"}},"required":["status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/visual-reviews":{"post":{"operationId":"createSpaceVersionVisualReview","security":[{"bearerAuth":[]}],"summary":"Start a temporary visual review","description":"Creates a version-bound review that expires after one hour. The browser URL is a secret review capability. It does not create comments.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page path to open within the deployment.","type":"string","minLength":1,"maxLength":1024},"parentOrigin":{"description":"Verified App origin. Omit this field for browser review.","type":"string","format":"uri"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page path to open within the deployment.","type":"string","minLength":1,"maxLength":1024},"parentOrigin":{"description":"Verified App origin. Omit this field for browser review.","type":"string","format":"uri"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","description":"Page path to open within the deployment.","type":"string","minLength":1,"maxLength":1024},"parentOrigin":{"description":"Verified App origin. Omit this field for browser review.","type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"session":{"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)$"},"spaceId":{"type":"string"},"versionId":{"type":"string"},"title":{"type":"string"},"sourceCommitSha":{"type":["string","null"]},"origin":{"type":"string","format":"uri"},"landingPath":{"type":"string"},"expiresAt":{"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))$"},"status":{"type":"string","enum":["draft","submitted"]},"submission":{"anyOf":[{"type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"additionalProperties":false,"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"],"additionalProperties":false},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"],"additionalProperties":false},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"],"additionalProperties":false}},"additionalProperties":false,"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"],"additionalProperties":false},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false,"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"],"additionalProperties":false},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"],"additionalProperties":false},"description":"Feedback collected by the user."}},"required":["submissionId","notes"],"additionalProperties":false},{"type":"null"}]}},"required":["id","spaceId","versionId","title","sourceCommitSha","origin","landingPath","expiresAt","status","submission"],"additionalProperties":false},"browserUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri"},"parentOrigin":{"type":"string","format":"uri"}},"required":["session","browserUrl","previewUrl","parentOrigin"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/visual-reviews/{reviewId}":{"get":{"operationId":"getVisualReview","security":[{"bearerAuth":[]}],"summary":"Read submitted visual feedback","description":"Read the review session and its submitted notes. The initiating credential must still have permission to download the recorded version.","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"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)$"},"spaceId":{"type":"string"},"versionId":{"type":"string"},"title":{"type":"string"},"sourceCommitSha":{"type":["string","null"]},"origin":{"type":"string","format":"uri"},"landingPath":{"type":"string"},"expiresAt":{"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))$"},"status":{"type":"string","enum":["draft","submitted"]},"submission":{"anyOf":[{"type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"additionalProperties":false,"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"],"additionalProperties":false},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"],"additionalProperties":false},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"],"additionalProperties":false}},"additionalProperties":false,"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"],"additionalProperties":false},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false,"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"],"additionalProperties":false},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"],"additionalProperties":false},"description":"Feedback collected by the user."}},"required":["submissionId","notes"],"additionalProperties":false},{"type":"null"}]}},"required":["id","spaceId","versionId","title","sourceCommitSha","origin","landingPath","expiresAt","status","submission"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/visual-reviews/{reviewId}/submission":{"post":{"operationId":"submitVisualReview","security":[{"bearerAuth":[]}],"summary":"Submit a visual feedback batch","description":"Submits this batch once. An identical retry returns the same batch. A different batch requires a new review.","parameters":[{"name":"reviewId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"]},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"]},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"]},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"]}},"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"]},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"]},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"]},"description":"Feedback collected by the user."}},"required":["submissionId","notes"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"]},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"]},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"]},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"]}},"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"]},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"]},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"]},"description":"Feedback collected by the user."}},"required":["submissionId","notes"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"]},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"]},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"]},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"]}},"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"]},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"]},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"]},"description":"Feedback collected by the user."}},"required":["submissionId","notes"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"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)$"},"spaceId":{"type":"string"},"versionId":{"type":"string"},"title":{"type":"string"},"sourceCommitSha":{"type":["string","null"]},"origin":{"type":"string","format":"uri"},"landingPath":{"type":"string"},"expiresAt":{"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))$"},"status":{"type":"string","enum":["draft","submitted"]},"submission":{"anyOf":[{"type":"object","properties":{"submissionId":{"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":"Stable submission ID. Reuse it with the identical batch for a retry."},"notes":{"minItems":1,"maxItems":20,"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)$","description":"Unique note ID."},"text":{"type":"string","minLength":1,"maxLength":4000,"description":"Feedback written by the user."},"path":{"type":"string","minLength":1,"maxLength":1024,"description":"Page path for this feedback."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport at capture time."},"anchor":{"anyOf":[{"type":"object","properties":{"v":{"type":"number","const":2,"description":"Anchor format version."},"resolver_version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Picker resolver version."},"type":{"type":"string","const":"element","description":"Selection type."},"source":{"type":"object","properties":{"space_id":{"type":"string","description":"Space ID."},"version_id":{"description":"Deployment version ID.","type":["string","null"]},"canonical_path":{"type":"string","description":"Selected page path."},"url":{"type":"string","format":"uri","description":"Selected page URL without credentials."}},"required":["space_id","version_id","canonical_path","url"],"additionalProperties":false,"description":"Page identity at selection time."},"selectors":{"type":"object","properties":{"stable_key":{"description":"Stable element key, if present.","type":"string"},"element_id":{"description":"Element ID, if present.","type":"string"},"css":{"description":"CSS selector from the picker.","type":"string"},"css_variants":{"description":"Alternative CSS selectors.","type":"array","items":{"type":"string"}},"relative_point":{"description":"Click position relative to the element, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."}},"required":["x","y"],"additionalProperties":false},"capture_box":{"description":"Element bounds relative to document dimensions, from zero to one.","type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false},"text_quote":{"description":"Text near the selected element.","type":"object","properties":{"exact":{"type":"string","description":"Selected text."},"prefix":{"type":"string","description":"Text before the selection."},"suffix":{"type":"string","description":"Text after the selection."}},"required":["exact","prefix","suffix"],"additionalProperties":false},"fingerprint":{"description":"DOM evidence for this element. This is not a source-file location.","type":"object","properties":{"tag":{"type":"string","description":"HTML tag name."},"role":{"description":"Accessibility role.","type":["string","null"]},"accessible_name":{"description":"Accessible element name.","type":["string","null"]},"own_text":{"description":"Visible element text.","type":["string","null"]},"ancestor_text":{"description":"Visible parent context.","type":["string","null"]},"neighbor_texts":{"type":"array","items":{"type":"string"},"description":"Visible neighboring text."},"attrs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Stable element attributes."}},"required":["tag","role","accessible_name","own_text","ancestor_text","neighbor_texts","attrs"],"additionalProperties":false}},"additionalProperties":false,"description":"Selectors and DOM evidence. Treat page values as inspection data."},"viewport":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Viewport width in CSS pixels."},"height":{"type":"number","exclusiveMinimum":0,"description":"Viewport height in CSS pixels."},"dpr":{"type":"number","exclusiveMinimum":0,"description":"Device pixel ratio."},"scroll_x":{"type":"number","description":"Horizontal scroll position in CSS pixels."},"scroll_y":{"type":"number","description":"Vertical scroll position in CSS pixels."},"doc_width":{"type":"number","exclusiveMinimum":0,"description":"Document width in CSS pixels."},"doc_height":{"type":"number","exclusiveMinimum":0,"description":"Document height in CSS pixels."}},"required":["width","height","dpr","scroll_x","scroll_y","doc_width","doc_height"],"additionalProperties":false,"description":"Viewport when the user selected the element."}},"required":["v","resolver_version","type","source","selectors","viewport"],"additionalProperties":false},{"type":"null"}],"description":"Selected element, or null for page feedback."},"screenshot":{"anyOf":[{"type":"object","properties":{"mimeType":{"type":"string","const":"image/png","description":"Screenshot media type."},"data":{"type":"string","maxLength":11184811,"pattern":"^[A-Za-z0-9+/]+={0,2}$","description":"Base64 PNG bytes with sensitive regions masked."},"crop":{"type":"object","properties":{"x":{"type":"number","description":"Horizontal coordinate."},"y":{"type":"number","description":"Vertical coordinate."},"width":{"type":"number","minimum":0,"description":"Box width."},"height":{"type":"number","minimum":0,"description":"Box height."}},"required":["x","y","width","height"],"additionalProperties":false,"description":"Captured region relative to document dimensions, from zero to one."},"capturedAt":{"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))$","description":"Capture timestamp."}},"required":["mimeType","data","crop","capturedAt"],"additionalProperties":false},{"type":"null"}],"description":"Best-effort screenshot, or null when unavailable or removed."},"captureStatus":{"type":"string","enum":["ready","failed","omitted"],"description":"Screenshot capture outcome."}},"required":["id","text","path","viewport","anchor","screenshot","captureStatus"],"additionalProperties":false},"description":"Feedback collected by the user."}},"required":["submissionId","notes"],"additionalProperties":false},{"type":"null"}]}},"required":["id","spaceId","versionId","title","sourceCommitSha","origin","landingPath","expiresAt","status","submission"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/work-mode":{"get":{"operationId":"getSpaceWorkMode","security":[{"bearerAuth":[]}],"summary":"Read your code review mode for a Space","description":"Read the user's saved editing mode: `vibe`, `code`, or null. Null means vibe mode. Do not ask the user to choose.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"mode":{"anyOf":[{"type":"string","enum":["vibe","code"],"description":"The mode selected by the user. Vibe it hides routine code review."},{"type":"null"}]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["space","mode","revision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"put":{"operationId":"setSpaceWorkMode","security":[{"bearerAuth":[]}],"summary":"Save the user's code review mode","description":"Save the mode the user asked for. Set `expectedRevision` to the `revision` you read. Do not choose a mode for the user.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"type":"string","enum":["vibe","code"],"description":"The mode selected by the user. Vibe it hides routine code review."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision read with getSpaceWorkMode. Use zero when no choice is saved."}},"required":["mode","expectedRevision"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"type":"string","enum":["vibe","code"],"description":"The mode selected by the user. Vibe it hides routine code review."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision read with getSpaceWorkMode. Use zero when no choice is saved."}},"required":["mode","expectedRevision"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"type":"string","enum":["vibe","code"],"description":"The mode selected by the user. Vibe it hides routine code review."},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision read with getSpaceWorkMode. Use zero when no choice is saved."}},"required":["mode","expectedRevision"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},"mode":{"anyOf":[{"type":"string","enum":["vibe","code"],"description":"The mode selected by the user. Vibe it hides routine code review."},{"type":"null"}]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["space","mode","revision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/runtime":{"get":{"operationId":"getSpaceRuntime","summary":"Get a space's runtime status","description":"Returns the serving runtime's health and placement for this space: instance, region, and serving state.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"liveVersionId":{"description":"Version that the live space URL now points to, if any.","type":["string","null"]},"pendingVersionId":{"description":"Version that live traffic is trying to publish now, if any.","type":["string","null"]},"liveUrl":{"description":"Live space URL. It moves to the latest version after a successful publish to `live`.","type":["string","null"]},"runtimeState":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Space operation-lifecycle status."},"liveVersionStatus":{"anyOf":[{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},{"type":"null"}]},"pendingVersionStatus":{"anyOf":[{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},{"type":"null"}]},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"app":{"anyOf":[{"type":"object","properties":{"capsule":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"serverRuntime":{"type":"string","const":"quickjs-rust"},"inspect":{"type":"object","properties":{"policy":{"type":"string","enum":["private","public"]}},"required":["policy"],"additionalProperties":false},"install":{"type":"object","properties":{"runtimeKind":{"type":"string","const":"zero"},"engine":{"type":"string","const":"quickjs-rust"},"storageRoot":{"type":"string","const":"__spacefast/zero"},"artifactPath":{"type":"string","const":"__spacefast/zero/artifact.json"},"configPath":{"type":"string","const":"__spacefast/zero/config.json"},"binary":{"type":"object","properties":{"path":{"type":"string","const":"__spacefast/zero/bin/stattic-runtime"},"compatibilityTarget":{"type":"object","properties":{"profile":{"type":"string","const":"linux-x86_64-gnu-v1"},"os":{"type":"string","const":"linux"},"cpu":{"type":"string","const":"x86_64"},"libc":{"type":"string","const":"glibc"},"linking":{"type":"string","const":"dynamic"},"requireExecutableBit":{"type":"boolean","const":true}},"required":["profile","os","cpu","libc","linking","requireExecutableBit"],"additionalProperties":false},"sha256":{"default":null,"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"required":{"type":"boolean","const":true}},"required":["path","compatibilityTarget","sha256","required"],"additionalProperties":false},"mysql":{"type":"object","properties":{"migrateAtFinalize":{"type":"boolean","const":true},"blockIncompatibleRollback":{"type":"boolean","const":true}},"required":["migrateAtFinalize","blockIncompatibleRollback"],"additionalProperties":false},"realtime":{"type":"object","properties":{"production":{"type":"string","const":"central"},"local":{"type":"string","const":"foreground-cli-ws"}},"required":["production","local"],"additionalProperties":false}},"required":["runtimeKind","engine","storageRoot","artifactPath","configPath","binary","mysql","realtime"],"additionalProperties":false},"tables":{"default":[],"type":"array","items":{"type":"string"}},"queries":{"default":[],"type":"array","items":{"type":"string"}},"mutations":{"default":[],"type":"array","items":{"type":"string"}},"actions":{"description":"Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.","type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["read","write"]},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["mode","method","path"],"additionalProperties":false}},"sockets":{"default":[],"type":"array","items":{"type":"string"}},"serverBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled server bundle size in bytes, or null when this version's metadata does not record it."},"clientBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled client bundle size in bytes, or null when this version's metadata does not record it."},"migrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"variables":{"type":"object","properties":{"source":{"type":"string","const":"stattic-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false},"realtime":{"type":"object","properties":{"mode":{"type":"string","enum":["central","cast","local"]},"centralUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"path":{"type":"string","minLength":1,"pattern":"^\\/.*"},"replayPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"replayUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"runPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"runUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"resourceKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"ticketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"socketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"spaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["mode","centralUrl"],"additionalProperties":false}},"required":["artifactId","appName","serverRuntime","inspect","install","tables","queries","mutations","endpoints","sockets","serverBundleSize","clientBundleSize","migrationCount","schemaHash","variables","realtime"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Zero capsule, if it carries one."},"worker":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"entry":{"type":"string","minLength":1},"compatibilityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"compatibilityFlags":{"default":[],"type":"array","items":{"type":"string"}},"routes":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"default":null,"anyOf":[{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},{"type":"null"}]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"subtree":{"default":false,"type":"boolean"}},"required":["method","path","subtree"],"additionalProperties":false}},"capabilities":{"default":{},"type":"object","properties":{"db":{"default":false,"type":"boolean"},"fetch":{"default":true,"type":"boolean"},"auth":{"default":false,"type":"boolean"},"env":{"default":false,"type":"boolean"},"realtime":{"default":false,"type":"boolean"},"logging":{"default":false,"type":"boolean"},"gravatar":{"default":false,"type":"boolean"},"spam":{"default":false,"type":"boolean"},"email":{"default":false,"type":"boolean"},"content":{"default":false,"type":"boolean"},"storage":{"default":false,"type":"boolean"},"connectors":{"default":false,"type":"boolean"},"crypto":{"default":false,"type":"boolean"}},"additionalProperties":false},"executionState":{"type":"string","enum":["absent","ready","serving"]},"bundleSize":{"type":"integer","minimum":0,"maximum":9007199254740991},"bundleSha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"variables":{"type":"object","properties":{"source":{"type":"string","const":"spacefast-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false}},"required":["artifactId","appName","entry","compatibilityDate","compatibilityFlags","routes","capabilities","executionState","bundleSize","bundleSha256","variables"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Functions worker, if it carries one."}},"required":["capsule","worker"],"additionalProperties":false},{"type":"null"}],"description":"What the live version runs: its Zero capsule and its Functions worker, each null when the published tree carries none of that product (both null for a space without a runtime). The whole object is null for callers whose credential does not carry `versions:read`, because app details read version contents, not serving state."},"pendingApp":{"anyOf":[{"type":"object","properties":{"capsule":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"serverRuntime":{"type":"string","const":"quickjs-rust"},"inspect":{"type":"object","properties":{"policy":{"type":"string","enum":["private","public"]}},"required":["policy"],"additionalProperties":false},"install":{"type":"object","properties":{"runtimeKind":{"type":"string","const":"zero"},"engine":{"type":"string","const":"quickjs-rust"},"storageRoot":{"type":"string","const":"__spacefast/zero"},"artifactPath":{"type":"string","const":"__spacefast/zero/artifact.json"},"configPath":{"type":"string","const":"__spacefast/zero/config.json"},"binary":{"type":"object","properties":{"path":{"type":"string","const":"__spacefast/zero/bin/stattic-runtime"},"compatibilityTarget":{"type":"object","properties":{"profile":{"type":"string","const":"linux-x86_64-gnu-v1"},"os":{"type":"string","const":"linux"},"cpu":{"type":"string","const":"x86_64"},"libc":{"type":"string","const":"glibc"},"linking":{"type":"string","const":"dynamic"},"requireExecutableBit":{"type":"boolean","const":true}},"required":["profile","os","cpu","libc","linking","requireExecutableBit"],"additionalProperties":false},"sha256":{"default":null,"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"required":{"type":"boolean","const":true}},"required":["path","compatibilityTarget","sha256","required"],"additionalProperties":false},"mysql":{"type":"object","properties":{"migrateAtFinalize":{"type":"boolean","const":true},"blockIncompatibleRollback":{"type":"boolean","const":true}},"required":["migrateAtFinalize","blockIncompatibleRollback"],"additionalProperties":false},"realtime":{"type":"object","properties":{"production":{"type":"string","const":"central"},"local":{"type":"string","const":"foreground-cli-ws"}},"required":["production","local"],"additionalProperties":false}},"required":["runtimeKind","engine","storageRoot","artifactPath","configPath","binary","mysql","realtime"],"additionalProperties":false},"tables":{"default":[],"type":"array","items":{"type":"string"}},"queries":{"default":[],"type":"array","items":{"type":"string"}},"mutations":{"default":[],"type":"array","items":{"type":"string"}},"actions":{"description":"Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.","type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["read","write"]},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["mode","method","path"],"additionalProperties":false}},"sockets":{"default":[],"type":"array","items":{"type":"string"}},"serverBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled server bundle size in bytes, or null when this version's metadata does not record it."},"clientBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled client bundle size in bytes, or null when this version's metadata does not record it."},"migrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"variables":{"type":"object","properties":{"source":{"type":"string","const":"stattic-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false},"realtime":{"type":"object","properties":{"mode":{"type":"string","enum":["central","cast","local"]},"centralUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"path":{"type":"string","minLength":1,"pattern":"^\\/.*"},"replayPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"replayUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"runPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"runUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"resourceKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"ticketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"socketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"spaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["mode","centralUrl"],"additionalProperties":false}},"required":["artifactId","appName","serverRuntime","inspect","install","tables","queries","mutations","endpoints","sockets","serverBundleSize","clientBundleSize","migrationCount","schemaHash","variables","realtime"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Zero capsule, if it carries one."},"worker":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"entry":{"type":"string","minLength":1},"compatibilityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"compatibilityFlags":{"default":[],"type":"array","items":{"type":"string"}},"routes":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"default":null,"anyOf":[{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},{"type":"null"}]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"subtree":{"default":false,"type":"boolean"}},"required":["method","path","subtree"],"additionalProperties":false}},"capabilities":{"default":{},"type":"object","properties":{"db":{"default":false,"type":"boolean"},"fetch":{"default":true,"type":"boolean"},"auth":{"default":false,"type":"boolean"},"env":{"default":false,"type":"boolean"},"realtime":{"default":false,"type":"boolean"},"logging":{"default":false,"type":"boolean"},"gravatar":{"default":false,"type":"boolean"},"spam":{"default":false,"type":"boolean"},"email":{"default":false,"type":"boolean"},"content":{"default":false,"type":"boolean"},"storage":{"default":false,"type":"boolean"},"connectors":{"default":false,"type":"boolean"},"crypto":{"default":false,"type":"boolean"}},"additionalProperties":false},"executionState":{"type":"string","enum":["absent","ready","serving"]},"bundleSize":{"type":"integer","minimum":0,"maximum":9007199254740991},"bundleSha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"variables":{"type":"object","properties":{"source":{"type":"string","const":"spacefast-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false}},"required":["artifactId","appName","entry","compatibilityDate","compatibilityFlags","routes","capabilities","executionState","bundleSize","bundleSha256","variables"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Functions worker, if it carries one."}},"required":["capsule","worker"],"additionalProperties":false},{"type":"null"}],"description":"What the pending version would run — the same projection as `app`, read from `pendingVersionId`'s version so a dashboard can show what an in-flight publish is about to serve. Null when no publish is in flight, and null for callers without `versions:read`, exactly like `app`."}},"required":["liveVersionId","pendingVersionId","liveUrl","runtimeState","liveVersionStatus","pendingVersionStatus","operation","app","pendingApp"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Runtime"]}},"/v1/spaces/{spaceId}/logs/access":{"get":{"operationId":"listSpaceAccessLogs","summary":"Read a space's access logs","description":"Returns recent HTTP access log entries for the space. Ranges beyond the plan's retention are clamped with a warning.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"since","in":"query","required":false,"schema":{"description":"Start of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"ts":{"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))$"},"timestamp":{"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))$"},"host":{"type":"string"},"hostname":{"type":"string"},"method":{"type":"string"},"path":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["ts","timestamp","host","hostname","method","path","status","bytes"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false},"warnings":{"description":"List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/logs/edge":{"get":{"operationId":"listSpaceEdgeLogs","summary":"Read a space's edge logs","description":"Returns edge requests for one hostname assigned to this space, newest first. Defaults to the primary hostname and the past hour. Use a window of at most one hour within the past 24 hours. Plan retention can shorten the window. Filters within one field use OR; different fields use AND. Results include cache, timing, client, and security details. Access credentials in URLs are redacted. Cursors page a fixed snapshot and expire after five minutes. When using a cursor, the original window and filters apply. A truncated window requires a smaller time range or more filters. This is not a live stream.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"since","in":"query","required":false,"schema":{"description":"Start of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"hostname","in":"query","required":false,"schema":{"description":"Domain assigned to this space. Defaults to its primary hostname.","type":"string","minLength":1,"maxLength":253}},{"name":"remoteAddr","in":"query","required":false,"schema":{"description":"Include these client IP addresses. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","format":"ipv4","pattern":"^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"},{"type":"string","format":"ipv6","pattern":"^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"}]}}},{"name":"ja3Hash","in":"query","required":false,"schema":{"description":"Include these JA3 TLS fingerprints. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[a-fA-F0-9]{32}$"}}},{"name":"method","in":"query","required":false,"schema":{"description":"Include these HTTP methods. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":32,"pattern":"^[A-Z]+$"}}},{"name":"status","in":"query","required":false,"schema":{"description":"Include these HTTP status codes. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":100,"maximum":599}}},{"name":"userAgent","in":"query","required":false,"schema":{"description":"Include these exact User-Agent values. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}}},{"name":"asn","in":"query","required":false,"schema":{"description":"Include these autonomous system numbers. Repeat the query parameter for multiple values.","minItems":1,"maxItems":100,"type":"array","items":{"type":"integer","minimum":0,"maximum":4294967295}}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"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))$"},"hostname":{"type":"string"},"method":{"type":"string"},"path":{"type":"string","description":"Request path and query string. Access credentials are redacted."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"remoteAddr":{"type":["string","null"]},"remoteUser":{"type":["string","null"]},"ja3Hash":{"type":["string","null"]},"protocol":{"type":["string","null"]},"referer":{"type":["string","null"]},"userAgent":{"type":["string","null"]},"durationMs":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"countryCode":{"type":["string","null"]},"contentType":{"type":["string","null"]},"proxyType":{"type":["string","null"]},"cacheStatus":{"type":["string","null"]},"rateLimited":{"type":["boolean","null"]},"rateLimitReason":{"type":["string","null"]},"asn":{"type":["number","null"]},"defensiveMode":{"type":"object","properties":{"cookieStatus":{"type":["string","null"]},"challengeReason":{"type":["string","null"]},"challengeResult":{"type":["string","null"]}},"required":["cookieStatus","challengeReason","challengeResult"],"additionalProperties":false}},"required":["timestamp","hostname","method","path","status","remoteAddr","remoteUser","ja3Hash","protocol","referer","userAgent","durationMs","countryCode","contentType","proxyType","cacheStatus","rateLimited","rateLimitReason","asn","defensiveMode"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false},"warnings":{"description":"List diagnostics. edge_logs_truncated includes the query window and result limit; use a smaller window or more filters.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/logs/runtime":{"get":{"operationId":"listSpaceRuntimeLogs","summary":"Read a space's runtime logs","description":"Returns log lines written by the space's own code in the requested window — a Zero capsule's queries and mutations, a PHP function, or a Functions worker's handler. Returns empty data for a static space. An empty page with `hasMore: true` means the scan stopped early, not that the log ended. Lines are collected after the response returns, shipped off the box and indexed before they can be read back, so a line a request just wrote will not be here yet. This is not a live stream, and how far behind it runs is the provider's ingest delay rather than a number we control.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"since","in":"query","required":false,"schema":{"description":"Start of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"requestId","in":"query","required":false,"schema":{"description":"Return only lines emitted while serving this request.","type":"string","minLength":1}},{"name":"handlerName","in":"query","required":false,"schema":{"description":"Return only lines from this handler, either a Zero mutation or a Functions handler.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"timestamp":{"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))$"},"level":{"type":"string","enum":["debug","info","warn","error"]},"requestId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"handlerName":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"message":{"type":"string"},"metadata":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","timestamp","level","requestId","versionId","handlerName","message","metadata"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false},"warnings":{"description":"List-level diagnostics; log_retention_clamped names the effective `since` when the requested window exceeds the plan's log retention.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Activity"]}},"/v1/spaces/{spaceId}/runtime/realtime/events":{"get":{"operationId":"listSpaceRuntimeRealtimeEvents","summary":"Replay a space's runtime realtime events","description":"Returns stored realtime invalidation events for the space's live runtime, oldest first. A read with no `afterEventId` starts at the beginning of the retained window; follow `nextAfterEventId` as `?afterEventId=` to walk forward to the newest event, and stop when it is null. Retention is bounded: an `afterEventId` that has aged out of the window is a `validation_error`, never a silent restart from the oldest event.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"afterEventId","in":"query","required":false,"schema":{"description":"Walk forward from this event id, exclusive. Omit it to start at the oldest retained event; pass the previous page's `nextAfterEventId` to continue. An id that has aged out of the retention window is rejected.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum events to return.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"runtimeKind":{"type":"string","const":"zero"},"requestId":{"type":"string","minLength":1},"mutationName":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"changedTables":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"changedQueries":{"default":[],"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"schemaHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"committedAt":{"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":["eventId","spaceId","versionId","runtimeKind","requestId","mutationName","changedTables","changedQueries","schemaHash","committedAt"],"additionalProperties":false}},"nextAfterEventId":{"description":"Event id to pass as `afterEventId` for the next page; null when this page reached the newest retained event.","type":["string","null"]},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false,"description":"Legacy pagination envelope kept only for frozen pre-cutover Zero capsule clients that page by `pagination.nextCursor`. New clients read `nextAfterEventId`; `nextCursor` mirrors it exactly."}},"required":["data","nextAfterEventId","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Runtime"]}},"/v1/spaces/{spaceId}/storage":{"get":{"operationId":"listSpaceStorageObjects","summary":"List a space's stored objects","description":"Lists metadata for the space's unversioned objects. The space owner can inspect every stored object without exposing object bytes or uploader email addresses.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1,"maxLength":2048}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum objects to return.","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"public":{"type":"boolean"},"protection":{"type":"string","const":"commerce"},"contentType":{"type":"string","minLength":1,"maxLength":255},"createdAt":{"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))$"},"filename":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"uploaderId":{"type":"string","minLength":1,"maxLength":255},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"url":{"type":"string","minLength":1}},"required":["id","public","contentType","createdAt","size","uploaderId","sha256","url"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"post":{"operationId":"createSpaceStorageObject","summary":"Upload a stored object","description":"Stores one object for the space from the raw request body. The request's `Content-Type` becomes the object's; `filename` is what a person sees in a list and what a download is saved as. The same content policy as a visitor upload applies: executable and active web content is refused.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"requestBody":{"required":true,"description":"The object's raw bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"The object's bytes."}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"public":{"type":"boolean"},"protection":{"type":"string","const":"commerce"},"contentType":{"type":"string","minLength":1,"maxLength":255},"createdAt":{"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))$"},"filename":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"uploaderId":{"type":"string","minLength":1,"maxLength":255},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"url":{"type":"string","minLength":1}},"required":["id","public","contentType","createdAt","size","uploaderId","sha256","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"public","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"filename","in":"query","required":false,"schema":{"description":"Name to store the object under, for display and downloads.","type":"string","minLength":1,"maxLength":255}}],"tags":["Spaces"]}},"/v1/spaces/{spaceId}/storage/{objectId}":{"get":{"operationId":"readSpaceStorageObject","summary":"Download a stored object","description":"Downloads an app storage object's bytes with space read access, including private objects uploaded by signed-in visitors.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"responses":{"200":{"description":"The object's bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"objectId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"tags":["Spaces"]},"delete":{"operationId":"deleteSpaceStorageObject","summary":"Delete a stored object","description":"Force-deletes an app storage object as the space owner, including objects uploaded by another signed-in visitor.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"objectId","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"deleted":{"type":"boolean"}},"required":["id","deleted"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/db":{"get":{"operationId":"getSpaceDatabase","summary":"Inspect a space's database","description":"Returns the declared tables and pending migration plan of the live version's database. This route is Zero-kind only because workers do not declare a table set. Use `db console` to read a worker's database directly. Returns `db_not_available` when the live version has no database. Returns `runtime_kind_mismatch` when the live version is a worker.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"artifactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"backend":{"anyOf":[{"type":"string","const":"mysql"},{"type":"null"}]},"migrationMode":{"anyOf":[{"type":"string","enum":["safe","drop","rename"]},{"type":"null"}]},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"tables":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"columns":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":{"type":"string","enum":["string","boolean","number","json"]},"nullable":{"default":false,"type":"boolean"},"optional":{"type":"boolean","const":true},"userReference":{"type":"boolean","const":true},"default":{}},"required":["name","type","nullable"],"additionalProperties":false}},"indexes":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"fields":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"unique":{"type":"boolean"}},"required":["name","fields"],"additionalProperties":false}}},"required":["name","columns","indexes"],"additionalProperties":false}},"migrations":{"default":[],"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"create_table"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["op","table"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"column":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":{"type":"string","enum":["string","boolean","number","json"]},"nullable":{"default":false,"type":"boolean"},"optional":{"type":"boolean","const":true},"userReference":{"type":"boolean","const":true},"default":{}},"required":["name","type","nullable"],"additionalProperties":false}},"required":["op","table","column"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_index"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"columns":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"unique":{"default":false,"type":"boolean"}},"required":["op","table","name","columns","unique"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_index"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","name","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_table"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"column":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","column","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_table"},"from":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"to":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"rename"}},"required":["op","from","to","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"from":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"to":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"rename"}},"required":["op","table","from","to","explicit"],"additionalProperties":false}]}},"plan":{"anyOf":[{"type":"object","properties":{"applied":{"description":"Whether this plan has been run against the space database. `null` when the control plane has no application record and cannot truthfully say.","type":["boolean","null"]},"appliedSchemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}],"description":"Schema hash recorded when a plan was last applied for this version, if any."},"pendingOperationCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Queued or running `db migrate` operations for this space. Non-zero means an apply is still waiting."}},"required":["applied","appliedSchemaHash","pendingOperationCount"],"additionalProperties":false},{"type":"null"}],"description":"Applied-state of the live version's migration plan. `null` when the live version declares no migration plan."}},"required":["versionId","artifactId","backend","migrationMode","schemaHash","tables","migrations","plan"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/db/dump":{"get":{"operationId":"getSpaceDatabaseDump","summary":"Dump a space's database rows","description":"Returns rows from the live capsule's declared tables for debugging and export. Reads the space's own MySQL through its runtime, so this route answers only while that runtime is reachable. This route is Zero-kind only for the same reason as `/db`: workers do not declare a table set. Use `db console` for worker tables.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"query","required":false,"schema":{"description":"Dump only this declared table. Omit it to dump every declared table.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"description":"Maximum rows to read per table. Send `0` to read only each table's `rowCount`.","type":"integer","minimum":0,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"artifactId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"tables":{"default":[],"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"rowCount":{"default":null,"description":"Total rows in the table. The limit does not bound this value. `null` when the runtime did not count the rows.","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"rowCountExact":{"default":true,"description":"`false` when `rowCount` is the database's own estimate, used for large tables instead of counting every row.","type":"boolean"},"rows":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}}},"required":["name","rowCount","rowCountExact","rows"],"additionalProperties":false}}},"required":["versionId","artifactId","schemaHash","tables"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/db/export":{"get":{"operationId":"getSpaceDatabaseExport","summary":"List exportable tables and the export schema fence","description":"Returns the live capsule's sorted table inventory and schema fence. Follow with the per-table export page route; each page is bounded and revalidates the schema.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"schemaHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"consistency":{"type":"string","const":"per_page"},"ordering":{"type":"object","properties":{"tables":{"type":"string","const":"name_asc"},"rows":{"type":"string","const":"created_at_id_asc"}},"required":["tables","rows"],"additionalProperties":false},"tables":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}}},"required":["spaceId","versionId","schemaHash","consistency","ordering","tables"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/db/export/{table}":{"get":{"operationId":"getSpaceDatabaseExportPage","summary":"Read a complete database export page","description":"Returns one bounded keyset page of rows from a declared table in createdAt/id order. The schema hash and opaque cursor prevent pages from being mixed across exports.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},{"name":"schemaHash","in":"query","required":true,"schema":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"Schema fence from `GET /v1/spaces/{spaceId}/db/export`. A page whose table has changed shape since is rejected rather than mixed into the export."}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"limit","in":"query","required":false,"schema":{"default":500,"description":"Maximum rows to return in this page.","type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/db/migrate":{"post":{"operationId":"migrateSpaceDatabase","summary":"Apply the live capsule's schema migrations","description":"Re-runs the live capsule's stored migration plan against the space's MySQL. Use this route to retry a plan that failed during publish. This route is Zero-kind only. A worker declares no schema, and a static version has no database. An empty plan queues nothing.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"type":"string","minLength":1,"description":"Live version whose migration plan this is."},"runtimeKind":{"type":"string","const":"zero"},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string","enum":["safe","drop","rename"]},{"type":"null"}]},"operations":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"create_table"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["op","table"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"column":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"type":{"type":"string","enum":["string","boolean","number","json"]},"nullable":{"default":false,"type":"boolean"},"optional":{"type":"boolean","const":true},"userReference":{"type":"boolean","const":true},"default":{}},"required":["name","type","nullable"],"additionalProperties":false}},"required":["op","table","column"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"add_index"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"columns":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"unique":{"default":false,"type":"boolean"}},"required":["op","table","name","columns","unique"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_index"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","name","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_table"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"drop_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"column":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"drop"}},"required":["op","table","column","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_table"},"from":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"to":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"rename"}},"required":["op","from","to","explicit"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"rename_column"},"table":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"from":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"to":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"explicit":{"type":"string","const":"rename"}},"required":["op","table","from","to","explicit"],"additionalProperties":false}]},"description":"The plan the live capsule declared, in the order it applies."},"queued":{"type":"boolean","description":"Whether runtime finalize was queued to apply the plan. `false` when the plan is empty because there is nothing to run."}},"required":["versionId","runtimeKind","schemaHash","mode","operations","queued"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/db/console":{"post":{"operationId":"openSpaceDatabaseConsole","summary":"Open a database console for a space","description":"Mints a short-lived phpMyAdmin sign-in URL for the space's own MySQL. This route is the escape hatch for questions the schema and dump reads cannot answer. The URL grants full SQL authority over the space's database. For that reason, this route requires write access to the space and masks the URL in `--json` output.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"provider":{"type":"string","const":"phpmyadmin"},"url":{"type":"string","format":"uri","description":"Short-lived, single-use phpMyAdmin sign-in URL for the space MySQL. Treat it as a credential."}},"required":["provider","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Database"]}},"/v1/spaces/{spaceId}/wp-cli":{"post":{"operationId":"runSpaceWpCliCommand","summary":"Run a WP-CLI command against a space","description":"Runs one `wp` command against the space's own WordPress and waits for it to finish. This is the escape hatch beneath the named surfaces: anything WP-CLI can do that Spacefast has not given its own route. `args` is an already-split argument vector (`[\"option\", \"get\", \"blogname\"]`), relayed verbatim — no shell parses it, so nothing re-splits or re-globs what you send. Requires write access to the space, because a `wp` command has unrestricted authority over the site's data, and every run is written to the space's activity trail. Note that the provider runs this as a job and reports only whether WP-CLI exited zero: `output` is null because the runtime exposes no channel carrying the command's own stdout.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"args":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"mode":{"default":"full","type":"string","enum":["full","limited"]}},"required":["args"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"args":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"mode":{"default":"full","type":"string","enum":["full","limited"]}},"required":["args"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"args":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"mode":{"default":"full","type":"string","enum":["full","limited"]}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"taskId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"type":"string","enum":["succeeded","failed"]},"args":{"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["full","limited"]},"tookMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"output":{"type":["string","null"]}},"required":["taskId","status","args","mode","tookMs","output"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/claim":{"post":{"operationId":"claimSpace","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Claim a space with its key","description":"Moves an anonymously published Space into a team of the signed-in user, or returns the one decision still needed: sign-in, team choice, or agent consent. Send the Space key saved by the client that published it, plus any team or consent the user chose, and repeat until the response is `claimed`. A claimed Space no longer expires. The server checks eligibility. Never ask the user to paste a Space key into chat.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"description":"The space key, when not sent as bearer auth. Browser claim pages send it here after reading the /claim# fragment.","type":"string","minLength":1},"teamId":{"description":"Team receiving the space. Inferred when the caller has exactly one writable team; otherwise the response answers `team_required` with the choices.","type":"string","minLength":1},"agentContinuation":{"description":"User consent to keep the publishing agent authorized after the claim. Required (true or false) when the space is continuation-eligible; the server independently proves eligibility, so consent cannot grant continuation to an ineligible space.","type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"description":"The space key, when not sent as bearer auth. Browser claim pages send it here after reading the /claim# fragment.","type":"string","minLength":1},"teamId":{"description":"Team receiving the space. Inferred when the caller has exactly one writable team; otherwise the response answers `team_required` with the choices.","type":"string","minLength":1},"agentContinuation":{"description":"User consent to keep the publishing agent authorized after the claim. Required (true or false) when the space is continuation-eligible; the server independently proves eligibility, so consent cannot grant continuation to an ineligible space.","type":"boolean"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"description":"The space key, when not sent as bearer auth. Browser claim pages send it here after reading the /claim# fragment.","type":"string","minLength":1},"teamId":{"description":"Team receiving the space. Inferred when the caller has exactly one writable team; otherwise the response answers `team_required` with the choices.","type":"string","minLength":1},"agentContinuation":{"description":"User consent to keep the publishing agent authorized after the claim. Required (true or false) when the space is continuation-eligible; the server independently proves eligibility, so consent cannot grant continuation to an ineligible space.","type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"state":{"type":"string","enum":["unclaimed","claimed"]},"action":{"type":"string","enum":["claimed","login_required","team_required","consent_required"]},"space":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"liveUrl":{"type":["string","null"]},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","title","liveUrl","createdAt"],"additionalProperties":false},"claim":{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt"],"additionalProperties":false},"access":{"description":"The space's reusable Open link, returned once the claim commits so the page can open the (private-by-default) site. Pre-claim callers already hold the key and its door URL.","type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":16,"maxLength":512},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["url","token","expiresAt"],"additionalProperties":false},"continuation":{"type":"object","properties":{"eligible":{"type":"boolean","description":"Server-proven continuation eligibility. Eligible means the publish intent records an originating agent that holds the space key, the one-time exchange is unredeemed, and a safe secretless return exists. Only then can the UI offer continuation."},"granted":{"type":"boolean","description":"Whether the claim left the one-time continuation exchange open for the originating agent."}},"required":["eligible","granted"],"additionalProperties":false,"description":"Server-authoritative continuation eligibility and claim result."},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"],"additionalProperties":false}},"sharing":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string","enum":["pending","accepted"]},"grants":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","pattern":"^\\/.*"},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]}},"required":["scope","role"],"additionalProperties":false}}},"required":["id","displayName","status","grants"],"additionalProperties":false}},"links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string"},"landingPath":{"type":"string","pattern":"^\\/.*"},"scopes":{"type":"array","items":{"type":"string","pattern":"^\\/.*"}},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","revision","name","landingPath","scopes","expiresAt"],"additionalProperties":false}}},"required":["people","links"],"additionalProperties":false}},"required":["state","action","space","claim","continuation","sharing"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Publishing"]}},"/v1/claim/status":{"get":{"operationId":"getSpaceClaimStatus","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Read anonymous publish status","description":"Returns the live URL, reserved immutable URL, publish readiness, claim link, and claim expiry for a space-key-authenticated anonymous publish. After the claim, the same key reports `claim.state: \"claimed\"` plus whether the one-time continuation exchange is still open.","parameters":[{"name":"versionId","in":"query","required":false,"schema":{"description":"Version id from the anonymous publish receipt.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"publish":{"type":"object","properties":{"status":{"type":"string","enum":["pending","ready","failed","expired","claimed"]},"operationId":{"type":["string","null"]}},"required":["status"],"additionalProperties":false},"space":{"type":"object","properties":{"id":{"type":"string"},"liveUrl":{"type":["string","null"]}},"required":["id","liveUrl"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"ref":{"type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"immutableUrl":{"type":["string","null"]},"manifestHash":{"type":["string","null"]}},"required":["id","ref","number","status","immutableUrl","manifestHash"],"additionalProperties":false},"claim":{"type":"object","properties":{"state":{"type":"string","enum":["unclaimed","claimed"]},"url":{"description":"Claim page link (/claim#) while the space is unclaimed; null after.","type":["string","null"]},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"continuation":{"description":"Present once the space is claimed. Whether this key can still be exchanged once for a durable API key (POST /v1/claim/exchange).","type":"string","enum":["available","used","unavailable"]}},"required":["state","url","expiresAt"],"additionalProperties":false}},"required":["publish","space","version","claim"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Publishing"]}},"/v1/claim/exchange":{"post":{"operationId":"exchangeSpaceClaim","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Exchange a claimed space's key for an API key","description":"One-time exchange of a demoted space key (bearer) for a durable publish API key, available after the owner claimed the space with agent continuation enabled. The API key is shown exactly once; store it and retry the failed request with it.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"liveUrl":{"type":["string","null"]}},"required":["id","slug","liveUrl"],"additionalProperties":false},"credential":{"type":"object","properties":{"accessToken":{"type":"string","description":"Durable publish API key minted by the one-time exchange. Shown exactly once. Store it (for example, in .spacefast/state.json) and never print it."},"accessTokenId":{"type":"string"},"label":{"type":["string","null"]},"teamId":{"type":"string"}},"required":["accessToken","accessTokenId","label","teamId"],"additionalProperties":false}},"required":["space","credential"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Publishing"]}},"/v1/claim/rotate":{"post":{"operationId":"rotateSpaceKey","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Rotate a space key","description":"Replaces the shown-once space key for one unclaimed Space with a fresh key, door URL, and claim link. The previous key, its URLs, and its view sessions stop authorizing; explicit recipient Links survive.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1}},"required":["spaceId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1}},"required":["spaceId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1}},"required":["spaceId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"claim":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately."},"url":{"type":"string","format":"uri","description":"The site door: the live URL with the space key in /__/ form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key."},"claimUrl":{"type":"string","format":"uri","description":"Claim page link in /claim# form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once."},"expiresAt":{"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":["key","url","claimUrl","expiresAt"],"additionalProperties":false,"description":"Replacement space key, door URL, and claim link. Shown exactly once; the previous key, its URLs, and its view sessions stop working."}},"required":["spaceId","claim"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Publishing"]}},"/v1/spaces/{spaceId}/claim-reminders":{"post":{"operationId":"createSpaceClaimReminder","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Request an expiry reminder","description":"Registers an email reminder for an unclaimed anonymous space (sent ~3 hours before expiry). Authenticate with the claim token; the address is deleted on claim or expiry and never logged.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Expiry-reminder address for an unclaimed anonymous space. Stored only until the space is claimed or expires, then deleted; never logged."}},"required":["email"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Expiry-reminder address for an unclaimed anonymous space. Stored only until the space is claimed or expires, then deleted; never logged."}},"required":["email"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Expiry-reminder address for an unclaimed anonymous space. Stored only until the space is claimed or expires, then deleted; never logged."}},"required":["email"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/slugs/availability":{"get":{"operationId":"getSlugAvailability","security":[{"bearerAuth":[]}],"summary":"Check slug availability","description":"Checks whether a space or team slug is available and suggests an alternative when it is taken.","parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["team","space"],"description":"Which kind of slug to check: a space slug or a team slug."}},{"name":"slug","in":"query","required":false,"schema":{"default":"","description":"Slug to check. It is normalized first, and the verdict describes the normalized form.","type":"string"}},{"name":"currentSlug","in":"query","required":false,"schema":{"description":"The resource's current slug, when renaming. A slug that normalizes to this one stays available instead of colliding with itself.","type":"string"}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Team the space would belong to. Space slugs and their managed hostnames are checked inside that team; ignored for `kind=team`.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"kind":{"type":"string","enum":["team","space"],"description":"Resource kind the slug was checked for."},"normalizedSlug":{"type":"string","description":"Slug after normalization; empty when nothing usable."},"available":{"type":"boolean","description":"Whether the normalized slug can be used as-is."},"suggestion":{"description":"Closest available slug when the requested one is taken; null when available.","type":["string","null"]},"hostnameAvailable":{"description":"Whether the normalized slug's managed hostname can be used as-is.","type":"boolean"},"hostnameSuggestion":{"description":"Closest available public name when the managed hostname is taken.","type":["string","null"]},"selectedHostname":{"description":"Managed hostname selected for the requested slug.","type":["string","null"]},"hostnameConflictReason":{"description":"Stable reason code for the selected hostname conflict, when unavailable.","type":["string","null"]},"globalHostnameAvailable":{"description":"Whether `{slug}.space.fast` is available. A label is one identity across every managed apex.","type":"boolean"},"globalHostname":{"description":"The global managed hostname checked.","type":["string","null"]},"globalHostnameSuggestion":{"description":"Closest available global public name when `{slug}.space.fast` is taken.","type":["string","null"]}},"required":["kind","normalizedSlug","available","suggestion"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/resolve":{"get":{"operationId":"resolveSpace","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Resolve a space reference","description":"Resolves a `spc_` id, hostname, URL, or slug to one space you can access. Slug matches across multiple teams fail with `ambiguous_space_slug`.","parameters":[{"name":"ref","in":"query","required":true,"schema":{"description":"Space reference: a `spc_` id, a hostname/URL, or a slug.","type":"string"}},{"name":"teamRef","in":"query","required":false,"schema":{"description":"Optional team id or slug that scopes slug resolution when a slug matches spaces in more than one of your teams.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/plan-policy":{"get":{"operationId":"getSpacePlanPolicy","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Get the plan policy for a space","description":"Returns the effective plan limits and disabled behaviors that apply to this space's publishes and serving.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","external_principal"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false,"description":"Principal the policy was resolved for."},"spaceId":{"description":"Space the policy was resolved against, when space-scoped.","type":"string"},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"limits":{"type":"object","properties":{"storageBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"teamMembers":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"liveSpaces":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"customDomains":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"boughtDomains":{"type":"string","const":"unlimited","description":"Domains bought through Spacefast never count against custom domain limits."},"auditLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildAccessLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled daily allowance: pricing never separates user pushes from CI builds, and passing it warns rather than blocks."},"subTeams":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"externalDomainGroups":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxFileBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxVersionFiles":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"routingRules":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."}},"required":["storageBytes","teamMembers","liveSpaces","customDomains","boughtDomains","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysDaily"],"additionalProperties":false,"description":"Named plan limits."},"usage":{"description":"Current usage against the named limits, where the platform meters it.","type":"object","properties":{"storageBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"teamMembers":{"type":"integer","minimum":0,"maximum":9007199254740991},"liveSpaces":{"type":"integer","minimum":0,"maximum":9007199254740991},"customDomains":{"description":"Externally connected custom domains across the whole team.","type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysToday":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"warnings":{"description":"Plan-level warnings (for example storage over quota).","type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["info","warning","error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["severity","code","message"],"additionalProperties":false}},"disabledBehaviors":{"description":"Behaviors the plan disables instead of failing publishes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["free_external_proxy_disabled"],"description":"Stable code identifying the disabled behavior."},"behavior":{"type":"string","description":"What the platform does instead of honoring the behavior."},"renderedAs":{"type":"string","enum":["warning","platform_page","ignored"],"description":"How the disablement surfaces to users."}},"required":["code","behavior","renderedAs"],"additionalProperties":false}}},"required":["principal","plan","limits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/apply-state":{"get":{"operationId":"getSpaceApplyState","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Get a space's runtime apply state","description":"Returns whether the space has desired runtime changes pending, applying, live, or failed. This is the space's own serving state, not an operation's: for the progress of a specific apply, poll the operation handle that apply returned.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["live","pending","applying","failed"],"description":"`live` when the runtime matches the desired state, `pending` when a change is waiting to be applied, `applying` while an apply is running, `failed` when the last apply failed."},"desiredRevision":{"description":"Version the space wants to serve; null when nothing is pending.","type":["string","null"]},"appliedRevision":{"description":"Version the runtime is serving now.","type":["string","null"]},"lastError":{"description":"Why the last apply failed; null unless `status` is `failed`.","type":["string","null"]},"canApplyNow":{"type":"boolean","description":"Whether an apply would do something right now, for gating an Apply control."}},"required":["status","desiredRevision","appliedRevision","lastError","canApplyNow"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/apply":{"post":{"operationId":"applySpaceRuntimeChanges","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Apply space runtime changes","description":"Applies the space's desired runtime changes to the live runtime. Applies inline where it can and answers with the resulting apply state; when work remains, `operation` is the handle to poll at `GET /v1/operations/{operationId}`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["live","pending","applying","failed"],"description":"`live` when the runtime matches the desired state, `pending` when a change is waiting to be applied, `applying` while an apply is running, `failed` when the last apply failed."},"desiredRevision":{"description":"Version the space wants to serve; null when nothing is pending.","type":["string","null"]},"appliedRevision":{"description":"Version the runtime is serving now.","type":["string","null"]},"lastError":{"description":"Why the last apply failed; null unless `status` is `failed`.","type":["string","null"]},"canApplyNow":{"type":"boolean","description":"Whether an apply would do something right now, for gating an Apply control."}},"required":["status","desiredRevision","appliedRevision","lastError","canApplyNow"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/routing/compute":{"get":{"operationId":"computeSpaceRouting","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Compute a space's effective routing","description":"Returns the routing rules currently in effect for the space's live version, as the runtime evaluates them.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"latestVersionId":{"type":["string","null"]},"redirects":{"type":["string","null"]},"headers":{"type":["string","null"]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string","enum":["_redirects","_headers","sf.overlay","sf.jsonc","spacefast.jsonc","spacefast.json","sf.json",".sf/sf.json",".sf/config.jsonc",".sf/config.json"]},"line":{"type":"integer","minimum":0,"maximum":9007199254740991},"severity":{"type":"string","enum":["warning","error"]},"code":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"},"deferredUntilSubstitution":{"type":"boolean","const":true}},"required":["file","line","severity","code","message","source"],"additionalProperties":false}},"variableDependencies":{"type":"array","items":{"type":"string"}},"systemVariableDependencies":{"type":"array","items":{"type":"string"}}},"required":["latestVersionId","redirects","headers","diagnostics","variableDependencies","systemVariableDependencies"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/channels":{"get":{"operationId":"listSpaceChannels","summary":"List channels for a space","description":"Returns each named channel for the space and where it currently points. Read-only.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Channel name; `live` is the default."},"currentVersionId":{"description":"Version this channel currently serves, or null before first publish.","type":["string","null"]},"currentDeploymentUrl":{"description":"Immutable URL of the currently-served version, when known.","type":["string","null"]},"previousVersionId":{"description":"Last version this channel served before the current pointer (rollback target).","type":["string","null"]},"promotion":{"type":"string","enum":["auto","manual"],"description":"auto: publishes and green builds go live; manual: only explicit promotion moves the pointer."},"updatedAt":{"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))$","description":"Instant this channel last changed: a pointer move or a promotion policy change. `lastChange.at` is the pointer-move instant alone."},"lastChange":{"description":"The most recent pointer move from the promotion log, or null when none exists.","anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["publish","promote","rollback"]},{"type":"null"}],"description":"How the pointer moved, or null when the log entry predates kind recording."},"at":{"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))$","description":"Instant the pointer moved, from the promotion log."}},"required":["kind","at"],"additionalProperties":false},{"type":"null"}]}},"required":["name","currentVersionId","promotion","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/channels/{name}/history":{"get":{"operationId":"listSpaceChannelHistory","summary":"List a channel's promotion history","description":"Returns the channel.promoted activity log for the named channel, newest first. This is the deploy log.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"versionId":{"type":"string","description":"Version the channel was promoted to."},"channel":{"type":"string","description":"Channel that moved."},"previousVersionId":{"description":"Version the channel served immediately before this promotion.","type":["string","null"]},"actorType":{"description":"Kind of actor that performed the promotion.","anyOf":[{"type":"string","enum":["visitor","user","api_key","partner_token","oauth_client","anonymous_claim","system"]},{"type":"null"}]},"actorId":{"description":"Identifier of the promoting actor.","type":["string","null"]},"kind":{"description":"How the pointer moved, or null when the entry predates kind recording.","anyOf":[{"type":"string","enum":["publish","promote","rollback"]},{"type":"null"}]},"at":{"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))$","description":"Instant when the promotion happened."}},"required":["versionId","channel","at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/channels/{name}":{"patch":{"operationId":"updateSpaceChannel","summary":"Set a channel's promotion policy","description":"auto (default): publishes and green builds go live. manual: builds and publishes finalize ready but unpromoted; only an explicit promote moves the pointer. Only the live channel is supported today.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"promotion":{"type":"string","enum":["auto","manual"],"description":"Whether implicit promotion paths may move this channel's pointer."}},"required":["promotion"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"promotion":{"type":"string","enum":["auto","manual"],"description":"Whether implicit promotion paths may move this channel's pointer."}},"required":["promotion"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"promotion":{"type":"string","enum":["auto","manual"],"description":"Whether implicit promotion paths may move this channel's pointer."}},"required":["promotion"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"name":{"type":"string","description":"Channel name; `live` is the default."},"currentVersionId":{"description":"Version this channel currently serves, or null before first publish.","type":["string","null"]},"currentDeploymentUrl":{"description":"Immutable URL of the currently-served version, when known.","type":["string","null"]},"previousVersionId":{"description":"Last version this channel served before the current pointer (rollback target).","type":["string","null"]},"promotion":{"type":"string","enum":["auto","manual"],"description":"auto: publishes and green builds go live; manual: only explicit promotion moves the pointer."},"updatedAt":{"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))$","description":"Instant this channel last changed: a pointer move or a promotion policy change. `lastChange.at` is the pointer-move instant alone."},"lastChange":{"description":"The most recent pointer move from the promotion log, or null when none exists.","anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string","enum":["publish","promote","rollback"]},{"type":"null"}],"description":"How the pointer moved, or null when the log entry predates kind recording."},"at":{"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))$","description":"Instant the pointer moved, from the promotion log."}},"required":["kind","at"],"additionalProperties":false},{"type":"null"}]}},"required":["name","currentVersionId","promotion","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/crons":{"get":{"operationId":"listSpaceCrons","summary":"List a space's scheduled jobs","description":"Returns the scheduled jobs the live version declares in its config, each with its most recent failures. Read-only: crons are declared in sf.jsonc, so publishing is the only way to change them.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"description":"Live version these declarations come from, or null before the first publish.","type":["string","null"]},"crons":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable identifier for this entry, derived from its path."},"path":{"type":"string","description":"Path on this space that gets requested."},"schedule":{"type":"string","description":"Schedule as declared, verbatim: named, an Nh/Nd/Nw interval, or a five-field crontab expression."},"recentFailures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Failure report id."},"occurredAt":{"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))$","description":"Instant the failure was reported."},"exitCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Exit status the platform reported for the run. Null when the failure report did not carry one."},"reason":{"description":"What the exit status means on this runtime, when it maps to a known failure mode. Null when unknown.","type":["string","null"]}},"required":["id","occurredAt","exitCode","reason"],"additionalProperties":false},"description":"Most recent failures reported for this entry, newest first. Empty when it has not failed."}},"required":["key","path","schedule","recentFailures"],"additionalProperties":false}},"unattributedFailures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Failure report id."},"occurredAt":{"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))$","description":"Instant the failure was reported."},"exitCode":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Exit status the platform reported for the run. Null when the failure report did not carry one."},"reason":{"description":"What the exit status means on this runtime, when it maps to a known failure mode. Null when unknown.","type":["string","null"]},"key":{"description":"Key the failure report named — an entry the live config no longer declares — or null when the report carried none.","type":["string","null"]}},"required":["id","occurredAt","exitCode","reason","key"],"additionalProperties":false},"description":"Failures that could not be tied to one entry, newest first. A cron removed from the config can still have failed while it was live."}},"required":["versionId","crons","unattributedFailures"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/crons/run":{"post":{"operationId":"runSpaceCron","summary":"Run a scheduled job now","description":"Requests one of the live version's declared cron paths on this space's default hostname, right now, and returns what it answered. Requires write access to the space, because a cron handler can mutate state — the same authority `wp-cli` and `db console` require. `target` is a declared key or path — anything else is rejected, and no request is made. Headers are not passed through and redirects are not followed; use `sf crons run --header` for a handler that checks a secret. The platform's `x-spacefast-cron` header is never carried, so a handler gated on it will refuse.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","minLength":1,"maxLength":512,"description":"Key or path of a scheduled job the live version declares."}},"required":["target"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","minLength":1,"maxLength":512,"description":"Key or path of a scheduled job the live version declares."}},"required":["target"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"type":"string","minLength":1,"maxLength":512,"description":"Key or path of a scheduled job the live version declares."}},"required":["target"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status the space answered with."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock milliseconds from request to the end of the snippet read."},"bodySnippet":{"type":"string","description":"First 200 characters of the response body, whitespace collapsed. Empty when the body was empty."}},"required":["status","durationMs","bodySnippet"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/data-sources":{"get":{"operationId":"listSpaceDataSources","summary":"List a space's data sources","description":"Returns the named WordPress data sources configured for this space, sorted by name.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"dataSources":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"default":{"type":"boolean","description":"Whether this source is the effective default."}},"required":["kind","url","name","default"],"additionalProperties":false}},"defaultDataSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},{"type":"null"}],"description":"Configured default source, or the first source in bytewise name order; null when no sources are configured."}},"required":["dataSources","defaultDataSource"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/variables":{"get":{"operationId":"listSpaceVariables","summary":"List a space's variables","description":"Returns the variables visible to this space, including inherited team values. Secret values are never returned.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Variable name, referenced as {{ vars.NAME }} in templates."},"scope":{"type":"string","enum":["space","principal"],"description":"Where the variable is defined; space wins over principal."},"secret":{"type":"boolean","description":"Secret values are write-only and never returned after creation."},"value":{"description":"Variable value; omitted when secret=true.","type":"string"},"channelValues":{"description":"Per-channel overrides compiled into channel template variants; omitted for secrets.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"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))$","description":"Instant when the variable was created."},"updatedAt":{"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))$","description":"Instant when the value was last written."}},"required":["name","scope","secret","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"scope":{"type":"string","const":"system","description":"Platform-provided, read-only variable."}},"required":["name","value","scope"],"additionalProperties":false}]}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]}},"/v1/spaces/{spaceId}/variables/{name}":{"put":{"operationId":"setSpaceVariable","summary":"Set a space variable","description":"Creates or updates a space variable by name. If a live or pending version exists, this queues a runtime sync operation. That operation can publish a settings version and update the live site. Otherwise, the value applies when a version next finalizes. Check the returned operation before reporting that the live site uses the new value.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Variable name, referenced as {{ vars.NAME }} in templates."},"scope":{"type":"string","enum":["space","principal"],"description":"Where the variable is defined; space wins over principal."},"secret":{"type":"boolean","description":"Secret values are write-only and never returned after creation."},"value":{"description":"Variable value; omitted when secret=true.","type":"string"},"channelValues":{"description":"Per-channel overrides compiled into channel template variants; omitted for secrets.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"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))$","description":"Instant when the variable was created."},"updatedAt":{"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))$","description":"Instant when the value was last written."}},"required":["name","scope","secret","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"The debounced re-finalize cascade this write coalesced into; null when no cascade was required."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]},"delete":{"operationId":"deleteSpaceVariable","summary":"Delete a space variable","description":"Deletes a space variable by name. If a live or pending version exists, this queues a runtime sync operation. That operation can publish a settings version and update the live site. Otherwise, the deletion applies when a version next finalizes. Check the returned operation before reporting that the deletion applies to the live site.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null","description":"Variable deletes return no resource body."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"The debounced re-finalize cascade this delete coalesced into; null when no cascade was required."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]}},"/v1/spaces/{spaceId}/password-credentials":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpacePasswordCredentials","summary":"List password access credentials","description":"Returns password credentials and their canonical scoped grants without returning password proofs.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(pwd_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpacePasswordCredential","summary":"Create password access","description":"Creates an Argon2id password proof and its single canonical scoped grant atomically.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["name","resources","capabilities","target","password"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["name","resources","capabilities","target","password"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["name","resources","capabilities","target","password"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(pwd_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/password-credentials/{credentialId}/rotate":{"post":{"security":[{"bearerAuth":[]}],"operationId":"rotateSpacePasswordCredential","summary":"Rotate a password access credential","description":"Replaces the Argon2id password proof while preserving the credential's canonical grant and scope.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"credentialId","in":"path","required":true,"schema":{"type":"string","pattern":"^(pwd_)[A-Za-z0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["password"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["password"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":1024}},"required":["password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(pwd_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/password-credentials/{credentialId}":{"delete":{"security":[{"bearerAuth":[]}],"operationId":"revokeSpacePasswordCredential","summary":"Revoke password access","description":"Revokes the password credential and its canonical grant so existing password sessions lose access.","responses":{"204":{"description":"The password credential was revoked."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"credentialId","in":"path","required":true,"schema":{"type":"string","pattern":"^(pwd_)[A-Za-z0-9]+$"}}],"tags":["Access"]}},"/v1/spaces/{spaceId}/machine-credentials":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceMachineCredentials","summary":"List machine access credentials","description":"Returns machine credentials and their canonical scoped grants without returning bearer token secrets.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"tokenHint":{"type":"string","minLength":1,"maxLength":32},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","tokenHint","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceMachineCredential","summary":"Create a machine access credential","description":"Creates a scoped grant and returns its opaque bearer token exactly once. Tokens are accepted only in the Authorization header.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources","capabilities","target"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources","capabilities","target"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources","capabilities","target"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"credential":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"tokenHint":{"type":"string","minLength":1,"maxLength":32},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","tokenHint","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false},"token":{"type":"string","minLength":32,"maxLength":256}},"required":["credential","token"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/machine-credentials/{credentialId}/rotate":{"post":{"security":[{"bearerAuth":[]}],"operationId":"rotateSpaceMachineCredential","summary":"Rotate a machine access credential","description":"Replaces the opaque bearer token and invalidates the previous token while preserving its canonical grant.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"credentialId","in":"path","required":true,"schema":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"credential":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"},"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"tokenHint":{"type":"string","minLength":1,"maxLength":32},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","grant","tokenHint","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false},"token":{"type":"string","minLength":32,"maxLength":256}},"required":["credential","token"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/machine-credentials/{credentialId}":{"delete":{"security":[{"bearerAuth":[]}],"operationId":"revokeSpaceMachineCredential","summary":"Revoke a machine access credential","description":"Revokes the machine credential and its canonical grant so the bearer token immediately loses authority.","responses":{"204":{"description":"The machine credential was revoked."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"credentialId","in":"path","required":true,"schema":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"}}],"tags":["Access"]}},"/v1/spaces/{spaceId}/grants":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceGrants","summary":"List active space grants","description":"Shows a Space's visibility: who can see it, and at which paths. Lists every active grant. Each grant names its source (config, system, or managed) and says if you can edit it here. Read the grants before you change access or make a Space public or private.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceGrant","summary":"Create a managed space grant","description":"Gives an audience access to a Space or path. Use it to make a Space public, or to share it with the team or one person. The body names the audience: public, team, person, or an external identity that one of the team's identity connections authenticates. The response includes the runtime update when it continues in the background. A grant whose point is commenting (`comments.write` without `content.publish` or `access.manage`) must target where Comments run: a live target needs the Space's comments surface set to `everywhere`. Otherwise 422 `comments_target_unavailable`. A public audience on a Space whose team allows private spaces only returns 403 `team_private_spaces_only`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","connectionId","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","connectionId","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","connectionId","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/grants/check":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"checkSpaceGrantAccess","summary":"Explain effective grant access","description":"Evaluates one route and target for any grant audience and returns additive capabilities, matching grants, and failed checks for every candidate.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"default":"/","description":"Request path to simulate, for example `/admin`.","type":"string","minLength":1,"maxLength":2048}},{"name":"target","in":"query","required":false,"schema":{"default":"live","description":"Which deployment the visit lands on: the live channel, one version, or a branch.","type":"string","enum":["live","version","branch"]}},{"name":"targetId","in":"query","required":false,"schema":{"description":"The version id or branch name named by `target`. Required for `version` and `branch`, and rejected for `live`.","type":"string","minLength":1,"maxLength":255}},{"name":"audience","in":"query","required":false,"schema":{"default":"public","description":"Who is knocking. Each audience needs its own identifying parameter below, and rejects the others.","type":"string","enum":["public","team","person","link","password","machine","external"]}},{"name":"personId","in":"query","required":false,"schema":{"description":"The person to simulate. Required with `audience=person`.","type":"string","minLength":1,"maxLength":255}},{"name":"linkId","in":"query","required":false,"schema":{"description":"The share link to simulate. Required with `audience=link`.","type":"string","minLength":1,"maxLength":255}},{"name":"passwordCredentialId","in":"query","required":false,"schema":{"description":"The password credential to simulate. Required with `audience=password`.","type":"string","minLength":1,"maxLength":255}},{"name":"machineId","in":"query","required":false,"schema":{"description":"The machine credential to simulate. Required with `audience=machine`.","type":"string","minLength":1,"maxLength":255}},{"name":"issuer","in":"query","required":false,"schema":{"description":"Identity connection issuer for the external identity to simulate. Required with `audience=external`.","type":"string","minLength":1,"maxLength":255}},{"name":"subject","in":"query","required":false,"schema":{"description":"Subject claim of the external identity to simulate. Required with `audience=external`.","type":"string","minLength":1,"maxLength":255}},{"name":"verifiedEmail","in":"query","required":false,"schema":{"description":"Whether the simulated visitor's email counts as verified.","type":"string","enum":["true","false"]}},{"name":"ipAddress","in":"query","required":false,"schema":{"description":"Hypothetical client IP. IP-constrained Grants remain unsupported and denied.","type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"path":{"type":"string","minLength":1},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1}},"required":["kind","branch"],"additionalProperties":false}]},"simulatedAudience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"capabilities":{"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"matchingGrants":{"type":"array","items":{"type":"object","properties":{"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}}},"required":["grant","capabilities"],"additionalProperties":false}},"evaluatedGrants":{"type":"array","items":{"type":"object","properties":{"grant":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"failures":{"type":"array","items":{"type":"string","enum":["space_unclaimed_config","audience","target","invalid_time","not_before","expired","max_uses","verified_email","network","network_ip_unsupported","resource_not_included","resource_excluded"]}}},"required":["grant","failures"],"additionalProperties":false}}},"required":["path","target","simulatedAudience","capabilities","matchingGrants","evaluatedGrants"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/grants/{grantId}":{"put":{"security":[{"bearerAuth":[]}],"operationId":"replaceSpaceGrant","summary":"Replace a managed space grant","description":"Atomically replaces every editable grant dimension and increments its generation. Changing capabilities or target to a commenting grant the comments surface never shows returns 422 `comments_target_unavailable`. A public audience on a Space whose team allows private spaces only returns 403 `team_private_spaces_only`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["audience","resources","capabilities","target"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"grant":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"audience":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"team"},"teamId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","teamId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"person"},"personId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","personId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"link"},"linkId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","linkId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"password"},"credentialId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","credentialId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"machine"},"machineId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","machineId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"issuer":{"type":"string","minLength":1,"maxLength":255},"subject":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","issuer","subject"],"additionalProperties":false}]},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["config","managed","system"]},"reference":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","reference"],"additionalProperties":false}},"required":["audience","resources","capabilities","constraints","target","id","source"],"additionalProperties":false},"generation":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["scheduled","active","expired"]},"sourceExplanation":{"type":"object","properties":{"editable":{"type":"boolean"},"label":{"type":"string","minLength":1},"detail":{"type":"string","minLength":1}},"required":["editable","label","detail"],"additionalProperties":false},"createdAt":{"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))$"},"updatedAt":{"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":["grant","generation","status","sourceExplanation","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"delete":{"security":[{"bearerAuth":[]}],"operationId":"revokeSpaceGrant","summary":"Revoke a managed space grant","description":"Revokes one managed grant after access is blocked and sessions disconnect. To make a Space private, revoke each editable public grant. A public grant from config or the system keeps the Space public. The response includes any remaining runtime update.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"grantId","in":"path","required":true,"schema":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"revoked":{"type":"boolean","const":true}},"required":["id","revoked"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/teams/{teamId}/access/defaults":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamAccessDefaults","summary":"Get the team's space access settings","description":"Returns the access a new space in this team starts with, whether the team allows private spaces only, whether it hides every space from search engines, and how many of its spaces are public now.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."},"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"],"description":"The general access a new space in this team starts with. Never `public` while `privateSpacesOnly` is true."},"publicSpaceCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many of the team's spaces hold or declare public access. While `privateSpacesOnly` is off, the spaces turning it on makes private; while it is on, the spaces whose sf.jsonc declares `access.public`, which turning it off makes public again."}},"required":["privateSpacesOnly","noindex","newSpaceGrantPreset","publicSpaceCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"setTeamAccessDefaults","summary":"Set the team's space access settings","description":"Changes only the fields sent. `newSpaceGrantPreset` applies to future spaces only. `privateSpacesOnly` and `noindex` apply to every space the team owns: turning `privateSpacesOnly` on revokes every public Grant on them, turns `noindex` on, and changes a `public` new-space default to `team`. While it is on, a `public` default or `noindex: false` returns 409 `team_private_spaces_only`. Turning it off makes spaces whose sf.jsonc declares `access.public` public again; `publicSpaceCount` counts them. `privateSpacesOnly` and `noindex` change only from a dashboard browser session: API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`. The spaces' runtime update continues in the background.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]},"privateSpacesOnly":{"description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"},"noindex":{"description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]},"privateSpacesOnly":{"description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"},"noindex":{"description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]},"privateSpacesOnly":{"description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"},"noindex":{"description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true. Dashboard only: these rules guard against agents, so API keys, CLI logins and OAuth or agent tokens get 403 `interactive_session_required`; read them instead.","type":"boolean"}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."},"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"],"description":"The general access a new space in this team starts with. Never `public` while `privateSpacesOnly` is true."},"publicSpaceCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many of the team's spaces hold or declare public access. While `privateSpacesOnly` is off, the spaces turning it on makes private; while it is on, the spaces whose sf.jsonc declares `access.public`, which turning it off makes public again."}},"required":["privateSpacesOnly","noindex","newSpaceGrantPreset","publicSpaceCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/sharing/logout-all":{"post":{"operationId":"logoutAllSpaceSessions","security":[{"bearerAuth":[]}],"summary":"Log out every space visitor session","description":"Invalidates every existing visitor session for this space immediately. Use it when a link or password has leaked.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"sessionVersion":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["sessionVersion"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/share-links":{"get":{"operationId":"listSpaceShareLinks","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"List share links","description":"Returns the stable scoped links that grant visitor access to this space. The durable branded URL is included only for principals that may manage this space's access policy; others read the link metadata with a null `url`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"grantId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdBy":{"type":["string","null"]},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"active":{"type":"boolean"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["id","spaceId","grantId","revision","name","landingPath","resources","capabilities","constraints","target","createdBy","openCount","lastUsedAt","revokedAt","createdAt","active","url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"post":{"operationId":"createSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Create a scoped share link","description":"Creates a stable visitor link that opens only its configured path scopes. Capabilities default to view-only. A link with `comments.write` must target where Comments run: while the Space's comments surface is `previews` (the default), target a Version, branch, or all Versions; a live target needs the surface set to `everywhere`. Otherwise 422 `comments_target_unavailable`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"default":["page.view"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"default":["page.view"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"default":["page.view"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["name","resources"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"grantId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdBy":{"type":["string","null"]},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"active":{"type":"boolean"},"url":{"type":"string","format":"uri"}},"required":["id","spaceId","grantId","revision","name","landingPath","resources","capabilities","constraints","target","createdBy","openCount","lastUsedAt","revokedAt","createdAt","active","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/share-links/{linkId}":{"patch":{"operationId":"updateSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Update a share link","description":"Updates supplied link fields when expectedRevision is current. A stale revision returns 409 with the current link; nested constraint fields patch independently and null clears one field. Changing capabilities or target to a commenting link the comments surface never shows returns 422 `comments_target_unavailable`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"expiresAt":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"type":["boolean","null"]},"frameOrigin":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},{"type":"null"}]},"countries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedCountries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedUserAgentSubstrings":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["expectedRevision"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"expiresAt":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"type":["boolean","null"]},"frameOrigin":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},{"type":"null"}]},"countries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedCountries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedUserAgentSubstrings":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["expectedRevision"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1,"maxLength":200},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"expiresAt":{"anyOf":[{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"type":["boolean","null"]},"frameOrigin":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},{"type":"null"}]},"countries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedCountries":{"anyOf":[{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},{"type":"null"}]},"excludedUserAgentSubstrings":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["expectedRevision"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"grantId":{"type":"string","minLength":1},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"name":{"type":"string","minLength":1},"landingPath":{"type":"string","minLength":1,"maxLength":1024},"resources":{"type":"object","properties":{"include":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}},"exclude":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024}}},"required":["include","exclude"],"additionalProperties":false},"capabilities":{"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"type":"object","properties":{"notBefore":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"expiresAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]},"maxUses":{"type":"integer","exclusiveMinimum":0,"maximum":1000000},"requireVerifiedEmail":{"type":"boolean"},"network":{"type":"object","properties":{"ipCidrs":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"IP address and CIDR Grants are unsupported because the serving runtime has no trusted visitor IP. Remove the IP constraint."},"countries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedCountries":{"minItems":1,"maxItems":250,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"excludedUserAgentSubstrings":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"additionalProperties":false},"frameOrigin":{"type":"string","minLength":1,"maxLength":2048}},"additionalProperties":false},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdBy":{"type":["string","null"]},"openCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"active":{"type":"boolean"}},"required":["id","spaceId","grantId","revision","name","landingPath","resources","capabilities","constraints","target","createdBy","openCount","lastUsedAt","revokedAt","createdAt","active"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"delete":{"operationId":"revokeSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Revoke a share link","description":"Revokes a share link and invalidates visitor sessions derived from it.","responses":{"204":{"description":"The share link was revoked."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Access"]}},"/v1/spaces/{spaceId}/share-links/{linkId}/frame-session":{"post":{"operationId":"launchSpacefastFrameLink","security":[{"sessionCookie":[]}],"summary":"Launch a Frame Link","description":"Spends one Link use and returns a short-lived origin-bound frame session. Public pages keep a clean shared-cache URL; private pages receive a scoped runtime proof.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024},"target":{"description":"The immutable Version to launch when the Link targets all Versions.","type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"}},"required":["kind","versionId"],"additionalProperties":false},"surface":{"default":"wordpress.preview","type":"string","enum":["wordpress.editor","wordpress.preview"]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024},"target":{"description":"The immutable Version to launch when the Link targets all Versions.","type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"}},"required":["kind","versionId"],"additionalProperties":false},"surface":{"default":"wordpress.preview","type":"string","enum":["wordpress.editor","wordpress.preview"]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":1024},"target":{"description":"The immutable Version to launch when the Link targets all Versions.","type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"}},"required":["kind","versionId"],"additionalProperties":false},"surface":{"default":"wordpress.preview","type":"string","enum":["wordpress.editor","wordpress.preview"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},"linkId":{"type":"string","pattern":"^(lnk_)[A-Za-z0-9]+$"},"linkRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentOrigin":{"type":"string","maxLength":2000,"format":"uri"},"path":{"type":"string","minLength":1,"maxLength":1024},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"},"routeRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["kind","versionId","routeRevision"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"},"branchRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["kind","branch","versionId","branchRevision"],"additionalProperties":false}]},"surface":{"type":"string","enum":["wordpress.editor","wordpress.preview"]},"access":{"type":"string","enum":["public","private"]},"url":{"type":"string","format":"uri"},"sessionToken":{"type":"string","minLength":32},"expiresAt":{"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":["spaceId","linkId","linkRevision","parentOrigin","path","target","surface","access","url","sessionToken","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/share-links/{linkId}/frame-session/renew":{"post":{"operationId":"renewSpacefastFrameLinkSession","security":[{"sessionCookie":[]}],"summary":"Renew a Frame session","description":"Re-evaluates the Link, target, path, origin, and access epochs without spending another Link use.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionToken":{"type":"string","minLength":32,"maxLength":16384}},"required":["sessionToken"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionToken":{"type":"string","minLength":32,"maxLength":16384}},"required":["sessionToken"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionToken":{"type":"string","minLength":32,"maxLength":16384}},"required":["sessionToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},"linkId":{"type":"string","pattern":"^(lnk_)[A-Za-z0-9]+$"},"linkRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"parentOrigin":{"type":"string","maxLength":2000,"format":"uri"},"path":{"type":"string","minLength":1,"maxLength":1024},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"},"routeRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["kind","versionId","routeRevision"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255},"versionId":{"type":"string","pattern":"^(ver_)[A-Za-z0-9]+$"},"branchRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["kind","branch","versionId","branchRevision"],"additionalProperties":false}]},"surface":{"type":"string","enum":["wordpress.editor","wordpress.preview"]},"access":{"type":"string","enum":["public","private"]},"url":{"type":"string","format":"uri"},"sessionToken":{"type":"string","minLength":32},"expiresAt":{"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":["spaceId","linkId","linkRevision","parentOrigin","path","target","surface","access","url","sessionToken","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/people":{"get":{"operationId":"listSpacePeople","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"List space people","description":"Returns the people who have direct scoped roles in this space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1,"maxLength":160},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdAt":{"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))$"},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","scope","role","target","createdAt","revokedAt"],"additionalProperties":false}},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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","spaceId","displayName","email","status","grants","invitedBy","inviteExpiresAt","acceptedAt","revokedAt","createdAt"],"additionalProperties":false}},"inheritedTeamAccess":{"anyOf":[{"type":"object","properties":{"teamId":{"type":"string","minLength":1},"teamName":{"type":"string","minLength":1},"ruleScopes":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":1024},"description":"Explicit team rule locations, not effective subtree coverage."},"members":{"type":"array","items":{"type":"object","properties":{"membershipId":{"type":"string","minLength":1},"userId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"teamRole":{"type":"string","minLength":1},"role":{"type":"string","const":"editor"}},"required":["membershipId","userId","displayName","email","teamRole","role"],"additionalProperties":false}}},"required":["teamId","teamName","ruleScopes","members"],"additionalProperties":false},{"type":"null"}]}},"required":["people","inheritedTeamAccess"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]},"post":{"operationId":"inviteSpacePerson","security":[{"bearerAuth":[]}],"summary":"Invite a person","description":"Invites a person by email with one or more scoped space roles. A `commenter` role on the live target needs the Space's comments surface set to `everywhere`; under `previews` (the default) target a Version, or get 422 `comments_target_unavailable`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["email","grants"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["email","grants"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["email","grants"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1,"maxLength":160},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdAt":{"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))$"},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","scope","role","target","createdAt","revokedAt"],"additionalProperties":false}},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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","spaceId","displayName","email","status","grants","invitedBy","inviteExpiresAt","acceptedAt","revokedAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/people/{personId}":{"delete":{"operationId":"removeSpacePerson","security":[{"bearerAuth":[]}],"summary":"Remove a person","description":"Removes a person's direct access and invalidates their space sessions.","responses":{"204":{"description":"The person was removed."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Access"]}},"/v1/spaces/{spaceId}/people/{personId}/resend":{"post":{"operationId":"resendSpacePersonInvitation","security":[{"bearerAuth":[]}],"summary":"Resend a person's invitation","description":"Replaces the pending invitation credential and sends a fresh accountless acceptance email.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1,"maxLength":160},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdAt":{"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))$"},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","scope","role","target","createdAt","revokedAt"],"additionalProperties":false}},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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","spaceId","displayName","email","status","grants","invitedBy","inviteExpiresAt","acceptedAt","revokedAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/people/{personId}/roles":{"put":{"operationId":"replaceSpacePersonRoles","security":[{"bearerAuth":[]}],"summary":"Replace a person's scoped roles","description":"Replaces every direct scoped role assigned to one person. A new `commenter` role on a target the comments surface never shows returns 422 `comments_target_unavailable`; roles the person already holds are kept as they are.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"personId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["grants"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["grants"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"grants":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"default":{"kind":"live"},"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]}},"required":["scope","role"]}}},"required":["grants"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"type":"string","minLength":1,"maxLength":160},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","accepted","revoked"]},"grants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]},"target":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"live"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"version"},"versionId":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","versionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"branch"},"branch":{"type":"string","minLength":1,"maxLength":255}},"required":["kind","branch"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"all_versions"}},"required":["kind"],"additionalProperties":false}]},"createdAt":{"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))$"},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","scope","role","target","createdAt","revokedAt"],"additionalProperties":false}},"invitedBy":{"type":["string","null"]},"inviteExpiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"acceptedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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","spaceId","displayName","email","status","grants","invitedBy","inviteExpiresAt","acceptedAt","revokedAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/access-requests":{"get":{"operationId":"listSpaceAccessRequests","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"List pending access requests","description":"Returns unresolved requests from people who want access to this space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"scope":{"type":"string","minLength":1,"maxLength":1024},"requestedRole":{"type":"string","enum":["viewer","commenter","editor","manager"]},"message":{"type":["string","null"]},"status":{"type":"string","enum":["verification_pending","pending","approved","denied","canceled","expired"]},"emailVerifiedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","displayName","email","scope","requestedRole","message","status","emailVerifiedAt","resolvedBy","resolvedAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/access-requests/{requestId}/approve":{"post":{"operationId":"approveSpaceAccessRequest","security":[{"bearerAuth":[]}],"summary":"Approve an access request","description":"Approves a pending request and adds the requester to the space's people with a live-site grant. A `commenter` role needs the Space's comments surface set to `everywhere`; under `previews` (the default) approve as `viewer`, or get 422 `comments_target_unavailable`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":1024},"role":{"type":"string","enum":["viewer","commenter","editor","manager"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"scope":{"type":"string","minLength":1,"maxLength":1024},"requestedRole":{"type":"string","enum":["viewer","commenter","editor","manager"]},"message":{"type":["string","null"]},"status":{"type":"string","enum":["verification_pending","pending","approved","denied","canceled","expired"]},"emailVerifiedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","displayName","email","scope","requestedRole","message","status","emailVerifiedAt","resolvedBy","resolvedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/access-requests/{requestId}/deny":{"post":{"operationId":"denySpaceAccessRequest","security":[{"bearerAuth":[]}],"summary":"Deny an access request","description":"Denies a pending space access request without granting authority.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","minLength":1},"spaceId":{"type":"string","minLength":1},"displayName":{"anyOf":[{"type":"string","minLength":1,"maxLength":160},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"scope":{"type":"string","minLength":1,"maxLength":1024},"requestedRole":{"type":"string","enum":["viewer","commenter","editor","manager"]},"message":{"type":["string","null"]},"status":{"type":"string","enum":["verification_pending","pending","approved","denied","canceled","expired"]},"emailVerifiedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"resolvedBy":{"type":["string","null"]},"resolvedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","displayName","email","scope","requestedRole","message","status","emailVerifiedAt","resolvedBy","resolvedAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Access"]}},"/v1/spaces/{spaceId}/open":{"post":{"operationId":"createSpaceOpenLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Open a private space","description":"Returns a link that opens a private space's live `/`. Targeted or account-authorized opens use an internal one-use browser handoff. `spaceId` also accepts a host the space serves, so a person the space was shared with can open it from its URL (agent credentials need the `person-pages:read` scope).","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"targetHost":{"type":"string","minLength":1,"maxLength":255}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"targetHost":{"type":"string","minLength":1,"maxLength":255}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"landingPath":{"default":"/","type":"string","minLength":1,"maxLength":1024},"targetHost":{"type":"string","minLength":1,"maxLength":255}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"kind":{"type":"string","const":"link"}},"required":["url","expiresAt","kind"],"additionalProperties":false},{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"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))$"},"kind":{"type":"string","enum":["management","claim_preview","person"]}},"required":["url","expiresAt","kind"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/teams/{teamId}/settings":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamSettings","summary":"Get team settings","description":"Returns the team's settings for Spaces and shared connectors.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"connectorsServing":{"default":{"adminOnly":false,"allowlist":null},"type":"object","properties":{"adminOnly":{"type":"boolean"},"allowlist":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["adminOnly","allowlist"],"additionalProperties":false},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for Spaces that use the team setting.","type":"boolean"},"requireTwoFactor":{"type":"boolean","description":"Whether every team member must have two-factor authentication on."},"teamId":{"type":"string","description":"The team id the settings belong to."},"wpCloudSettingsDefaults":{"type":"object","properties":{"default_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"burst_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_memory_limit":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_fs_permissions":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"static_file_404":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"canonicalize_aliases":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"space_quota":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"additionalProperties":false,"description":"WP Cloud defaults inherited by the team's Spaces."},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"regionOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"Placement regions currently available for new spaces."},"infraCapabilities":{"type":"object","properties":{"datacenters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"phpVersion":{"type":"string","const":"8.5"}},"required":["datacenters","phpVersion"],"additionalProperties":false,"description":"Live capabilities for the team's infra provider account."}},"required":["connectorsServing","requireTwoFactor","teamId","defaultDataLocation","regionOptions","infraCapabilities"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"updateTeamSettings","summary":"Update team settings","description":"Updates the team's settings for Spaces and shared connectors.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"connectorsServing":{"type":"object","properties":{"adminOnly":{"type":"boolean"},"allowlist":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["adminOnly","allowlist"]},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for Spaces that use the team setting.","type":"boolean"},"requireTwoFactor":{"description":"Requires every team member to have two-factor authentication on. Only a team owner can change it, and it can only be turned on once every current member has two-factor on.","type":"boolean"},"wpCloudSettingsDefaults":{"type":"object","properties":{"default_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"burst_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_memory_limit":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_fs_permissions":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"static_file_404":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"canonicalize_aliases":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"space_quota":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"description":"WP Cloud defaults inherited by the team's Spaces."}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"connectorsServing":{"type":"object","properties":{"adminOnly":{"type":"boolean"},"allowlist":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["adminOnly","allowlist"]},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for Spaces that use the team setting.","type":"boolean"},"requireTwoFactor":{"description":"Requires every team member to have two-factor authentication on. Only a team owner can change it, and it can only be turned on once every current member has two-factor on.","type":"boolean"},"wpCloudSettingsDefaults":{"type":"object","properties":{"default_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"burst_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_memory_limit":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_fs_permissions":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"static_file_404":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"canonicalize_aliases":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"space_quota":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"description":"WP Cloud defaults inherited by the team's Spaces."}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"connectorsServing":{"type":"object","properties":{"adminOnly":{"type":"boolean"},"allowlist":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["adminOnly","allowlist"]},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for Spaces that use the team setting.","type":"boolean"},"requireTwoFactor":{"description":"Requires every team member to have two-factor authentication on. Only a team owner can change it, and it can only be turned on once every current member has two-factor on.","type":"boolean"},"wpCloudSettingsDefaults":{"type":"object","properties":{"default_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"burst_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_memory_limit":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_fs_permissions":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"static_file_404":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"canonicalize_aliases":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"space_quota":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"description":"WP Cloud defaults inherited by the team's Spaces."}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"connectorsServing":{"default":{"adminOnly":false,"allowlist":null},"type":"object","properties":{"adminOnly":{"type":"boolean"},"allowlist":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["adminOnly","allowlist"],"additionalProperties":false},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for Spaces that use the team setting.","type":"boolean"},"requireTwoFactor":{"type":"boolean","description":"Whether every team member must have two-factor authentication on."},"teamId":{"type":"string","description":"The team id the settings belong to."},"wpCloudSettingsDefaults":{"type":"object","properties":{"default_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"burst_php_conns":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_memory_limit":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"php_fs_permissions":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"static_file_404":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"canonicalize_aliases":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"space_quota":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"additionalProperties":false,"description":"WP Cloud defaults inherited by the team's Spaces."},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."},"regionOptions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},"description":"Placement regions currently available for new spaces."},"infraCapabilities":{"type":"object","properties":{"datacenters":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false}},"phpVersion":{"type":"string","const":"8.5"}},"required":["datacenters","phpVersion"],"additionalProperties":false,"description":"Live capabilities for the team's infra provider account."}},"required":["connectorsServing","requireTwoFactor","teamId","defaultDataLocation","regionOptions","infraCapabilities"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/entitlements":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getTeamEntitlements","summary":"Get team entitlements","description":"Returns the team's resolved entitlements: plan limits plus any additive grants.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"planCode":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"limits":{"type":"object","properties":{"storageBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"teamMembers":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"liveSpaces":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"customDomains":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"auditLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildAccessLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"shareLinksPerSpace":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"invitesPerSpace":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"inviteEmailsPerSpaceDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"inviteEmailsPerAccountDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"pendingAccessRequestsPerSpace":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"subTeams":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"externalDomainGroups":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxFileBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxVersionFiles":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"routingRules":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."}},"required":["storageBytes","teamMembers","liveSpaces","customDomains","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysDaily","shareLinksPerSpace","invitesPerSpace","inviteEmailsPerSpaceDaily","inviteEmailsPerAccountDaily","pendingAccessRequestsPerSpace"],"additionalProperties":false},"externalProxy":{"type":"boolean","description":"Whether external proxy upstreams compile on this plan."},"pagesTemplates":{"type":"boolean","description":"Whether _pages/*.html full-page takeovers compile for this team."},"hideSpacefastBranding":{"type":"boolean","description":"Whether theme.hideSpacefastBranding removes the badge from default pages."}},"required":["planCode","limits","externalProxy","pagesTemplates","hideSpacefastBranding"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/plan-policy":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getTeamPlanPolicy","summary":"Get the team's plan policy","description":"Returns the team's plan limits, current usage, and disabled behaviors as enforced at publish and serving time.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","external_principal"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false,"description":"Principal the policy was resolved for."},"spaceId":{"description":"Space the policy was resolved against, when space-scoped.","type":"string"},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"limits":{"type":"object","properties":{"storageBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"teamMembers":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"liveSpaces":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"customDomains":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"boughtDomains":{"type":"string","const":"unlimited","description":"Domains bought through Spacefast never count against custom domain limits."},"auditLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildAccessLogRetentionHours":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled daily allowance: pricing never separates user pushes from CI builds, and passing it warns rather than blocks."},"subTeams":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"externalDomainGroups":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxFileBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"maxVersionFiles":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"routingRules":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."}},"required":["storageBytes","teamMembers","liveSpaces","customDomains","boughtDomains","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysDaily"],"additionalProperties":false,"description":"Named plan limits."},"usage":{"description":"Current usage against the named limits, where the platform meters it.","type":"object","properties":{"storageBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"teamMembers":{"type":"integer","minimum":0,"maximum":9007199254740991},"liveSpaces":{"type":"integer","minimum":0,"maximum":9007199254740991},"customDomains":{"description":"Externally connected custom domains across the whole team.","type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysToday":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"warnings":{"description":"Plan-level warnings (for example storage over quota).","type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["info","warning","error"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["severity","code","message"],"additionalProperties":false}},"disabledBehaviors":{"description":"Behaviors the plan disables instead of failing publishes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["free_external_proxy_disabled"],"description":"Stable code identifying the disabled behavior."},"behavior":{"type":"string","description":"What the platform does instead of honoring the behavior."},"renderedAs":{"type":"string","enum":["warning","platform_page","ignored"],"description":"How the disablement surfaces to users."}},"required":["code","behavior","renderedAs"],"additionalProperties":false}}},"required":["principal","plan","limits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/billing":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getTeamBilling","summary":"Get team billing","description":"Returns the team's plan, subscription state, and billable usage meters.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"checkoutSessionId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"checkout":{"anyOf":[{"type":"object","properties":{"planCode":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"status":{"type":"string","enum":["processing","activated","failed"]}},"required":["planCode","status"],"additionalProperties":false},{"type":"null"}]},"teamId":{"type":"string"},"planCode":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"billingCustomerRefs":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","const":"stripe"},"accountKey":{"type":"string"},"stripeCustomerId":{"type":["string","null"]},"diagnostics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","provider","accountKey","stripeCustomerId"],"additionalProperties":false}},"subscriptions":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","const":"stripe"},"planCode":{"anyOf":[{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},{"type":"null"}]},"status":{"type":"string"},"providerStatus":{"type":["string","null"]},"currentPeriodEnd":{"anyOf":[{"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))$"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":["boolean","null"]},"diagnostics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","provider","planCode","status","providerStatus","currentPeriodEnd","cancelAtPeriodEnd"],"additionalProperties":false}},"resourceCharges":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectType":{"type":"string","enum":["site","space","domain"]},"kind":{"type":"string"},"status":{"type":"string"},"graceUntil":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","subjectType","kind","status","graceUntil"],"additionalProperties":false}},"seatBilling":{"type":"object","properties":{"billableSeats":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["billableSeats"],"additionalProperties":false},"stripeCustomerId":{"description":"Deprecated compatibility field.","type":["string","null"]},"subscription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","const":"stripe"},"planCode":{"anyOf":[{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},{"type":"null"}]},"status":{"type":"string"},"providerStatus":{"type":["string","null"]},"currentPeriodEnd":{"anyOf":[{"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))$"},{"type":"null"}]},"cancelAtPeriodEnd":{"type":["boolean","null"]},"diagnostics":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","provider","planCode","status","providerStatus","currentPeriodEnd","cancelAtPeriodEnd"],"additionalProperties":false},{"type":"null"}],"description":"Deprecated compatibility field."},"usage":{"type":"object","properties":{"storageBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"storageQuotaBytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"storageOverageBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysToday":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Publishes and builds pooled into one meter for the current UTC day."},"buildsDeploysDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled daily plan allowance for publishes and builds. Passing it warns; it never blocks."},"buildsDeploysThisMonth":{"type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."}},"required":["storageBytes","storageQuotaBytes","storageOverageBytes","buildsDeploysToday","buildsDeploysDaily"],"additionalProperties":false}},"required":["checkout","teamId","planCode","billingCustomerRefs","subscriptions","resourceCharges","seatBilling","stripeCustomerId","subscription","usage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/usage":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getTeamUsage","summary":"Get team usage","description":"Returns the team's current usage counters: spaces, domains, members, storage, and monthly publishes.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"teamId":{"type":"string","description":"The team id the usage was metered for."},"usage":{"type":"object","properties":{"spaces":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Live spaces readable by the caller."},"liveSpaces":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Team-wide live Space count used for the plan quota."},"domains":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Custom domains the team has in inventory."},"members":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Team members."},"storageBytes":{"type":"number","description":"Disk occupied across the team's spaces, as measured by the serving infrastructure. Nothing is deduplicated: a file present in two spaces sits on two disks and counts twice."},"storageQuotaBytes":{"anyOf":[{"type":"number"},{"type":"string","const":"unlimited"}],"description":"Plan storage quota; \"unlimited\" when unbounded."},"storageOverageBytes":{"type":"number","description":"Bytes over the plan storage quota."},"storageCalculatedAt":{"description":"How far back the weakest measurement behind this total reaches. Null when the team's storage has not been measured yet. The meter lags the present by about an hour.","type":["string","null"]},"buildsDeploysToday":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Publishes (user pushes and CI builds pooled) in the current UTC day."},"buildsDeploysDaily":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Daily publish allowance for the plan. Passing it warns; it never blocks."},"buildsDeploysThisMonth":{"type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Plan limit value; \"unlimited\" when the plan does not limit this axis."},"meterStartedAt":{"description":"Instant when the current metering day started.","type":["string","null"]}},"required":["spaces","liveSpaces","domains","members","storageBytes","storageQuotaBytes","storageOverageBytes","storageCalculatedAt","buildsDeploysToday","buildsDeploysDaily","meterStartedAt"],"additionalProperties":false,"description":"Usage counters against the named plan limits."},"spaceStorage":{"type":"array","items":{"type":"object","properties":{"spaceId":{"type":"string","description":"Space id."},"slug":{"type":"string","description":"Space slug."},"title":{"type":"string","description":"Space display title."},"storageBytes":{"type":"number","description":"Disk this space occupies, as measured by the infrastructure serving it. Zero until the space has been measured."}},"required":["spaceId","slug","title","storageBytes"],"additionalProperties":false},"description":"Per-space storage breakdown for spaces the caller can read."}},"required":["teamId","usage","spaceStorage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/auto-enroll":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"listTeamAutoEnrollEntries","summary":"List team auto-enroll domains","description":"Returns company email domains that let verified account holders discover and join this team. Requires member-management authority.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"kind":{"type":"string","const":"domain"},"value":{"type":"string","description":"IDNA ASCII-canonicalized email domain."},"createdAt":{"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","teamId","kind","value","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"createTeamAutoEnrollEntry","summary":"Add a team auto-enroll domain","description":"Lets people with a verified address at this company domain join as members. New domains must match a verified email address of an existing team member. Domains are IDNA-canonicalized; shared mailbox providers, IP addresses and public suffixes are rejected. Adding an existing domain returns the same entry. No membership is created until the person chooses Join.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"domain","type":"string","const":"domain"},"value":{"type":"string","minLength":1,"maxLength":253,"description":"Company email domain, such as example.com."}},"required":["value"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"domain","type":"string","const":"domain"},"value":{"type":"string","minLength":1,"maxLength":253,"description":"Company email domain, such as example.com."}},"required":["value"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"default":"domain","type":"string","const":"domain"},"value":{"type":"string","minLength":1,"maxLength":253,"description":"Company email domain, such as example.com."}},"required":["value"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"kind":{"type":"string","const":"domain"},"value":{"type":"string","description":"IDNA ASCII-canonicalized email domain."},"createdAt":{"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","teamId","kind","value","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/auto-enroll/{entryId}":{"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:members.write"]}],"operationId":"deleteTeamAutoEnrollEntry","summary":"Remove a team auto-enroll domain","description":"Stops offering this team through the domain. Existing members keep their membership. The entry must belong to this team.","responses":{"204":{"description":"Domain removed."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"entryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/teams/{teamId}/join":{"post":{"security":[{"sessionCookie":[]}],"operationId":"joinTeam","summary":"Join a team","description":"Requires a browser session. Adds you as a member when your parent-team membership, invitation, company domain, or Automattician access offers the team. Joining a team you already belong to succeeds idempotently.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"teamId":{"type":"string"},"userId":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["teamId","userId","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/leave":{"post":{"security":[{"sessionCookie":[]}],"operationId":"leaveTeam","summary":"Leave a team","description":"Removes your own membership from the team. The last owner of a team must transfer ownership before leaving.","responses":{"204":{"description":"You left the team."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/teams/{teamId}/spaces":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"operationId":"listTeamSpaces","summary":"List a team's spaces","description":"Returns the team's live spaces, most recently updated first.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/variables":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"listTeamVariables","summary":"List team variables","description":"Returns the team's variables. Secret values are never returned; secrets expose only their metadata.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Variable name, referenced as {{ vars.NAME }} in templates."},"scope":{"type":"string","enum":["space","principal"],"description":"Where the variable is defined; space wins over principal."},"secret":{"type":"boolean","description":"Secret values are write-only and never returned after creation."},"value":{"description":"Variable value; omitted when secret=true.","type":"string"},"channelValues":{"description":"Per-channel overrides compiled into channel template variants; omitted for secrets.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"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))$","description":"Instant when the variable was created."},"updatedAt":{"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))$","description":"Instant when the value was last written."}},"required":["name","scope","secret","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]}},"/v1/teams/{teamId}/variables/{name}":{"put":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"setTeamVariable","summary":"Set a team variable","description":"Creates or updates a team variable by name. The new value applies when a version next finalizes; live versions keep their sealed values.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1},"secret":{"type":"boolean","description":"Whether the value is write-only."},"channelValues":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["value","secret"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Variable name, referenced as {{ vars.NAME }} in templates."},"scope":{"type":"string","enum":["space","principal"],"description":"Where the variable is defined; space wins over principal."},"secret":{"type":"boolean","description":"Secret values are write-only and never returned after creation."},"value":{"description":"Variable value; omitted when secret=true.","type":"string"},"channelValues":{"description":"Per-channel overrides compiled into channel template variants; omitted for secrets.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"createdAt":{"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))$","description":"Instant when the variable was created."},"updatedAt":{"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))$","description":"Instant when the value was last written."}},"required":["name","scope","secret","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"The debounced re-finalize cascade this write coalesced into; null when no cascade was required."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"deleteTeamVariable","summary":"Delete a team variable","description":"Deletes a team variable by name. The deletion applies when a version next finalizes; live versions keep their sealed values.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"name","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null","description":"Variable deletes return no resource body."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"The debounced re-finalize cascade this delete coalesced into; null when no cascade was required."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Variables"]}},"/v1/bootstrap":{"get":{"operationId":"getAccount","summary":"Get your account, teams, and referenced Spaces","description":"Returns who is signed in and the teams they can act for. Use it for account identity or login information, or when a task needs the caller's teams. Optional `teamRef` and `spaceRef` resolve a team or Space in the same read. A Space result includes serving status. A failed reference keeps its error without removing other results. The request fails only if Spacefast cannot identify the caller. Read a referenced value only when its status is `resolved`. It does not return passwords or tokens.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"parameters":[{"name":"teamRef","in":"query","required":false,"schema":{"description":"Team id or slug to resolve. It also scopes slug resolution for `spaceRef` and selects the team on the support boot payload. Present but blank is a request error, never `not_requested`.","type":"string"}},{"name":"spaceRef","in":"query","required":false,"schema":{"description":"Space reference: a `spc_` id, a hostname or URL, or a slug. Slugs resolve only within spaces you can already reach, so an unclaimed space is reachable by id or hostname only. Present but blank is a request error, never `not_requested`.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"me":{"anyOf":[{"type":"object","properties":{"subject":{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind: the session user, or the machine credential's acting subject."},"id":{"type":"string","description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false,"description":"The authenticated subject of the calling credential."},"user":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"User id."},"email":{"description":"User email.","type":["string","null"]},"name":{"description":"User display name.","type":["string","null"]},"isAutomattician":{"type":"boolean","description":"Whether the linked WordPress.com account is an Automattician."},"wpcom":{"description":"Deprecated compatibility field. Current servers return null; readers accept older provider profiles and responses that omitted this field during the rolling upgrade.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"isSuperadmin":{"type":"boolean","description":"Whether the user is a platform operator."},"pendingDeletionAt":{"description":"When this account's deletion was requested, while the close is still running. Null for every account that is not being deleted.","type":["string","null"]},"dashboardPrefs":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The user's dashboard preferences. Carried on the boot payload the dashboard already fetches, so applying a cross-device preference costs no extra request. Write with `PATCH /v1/me/dashboard-preferences`."},"privacy":{"type":"object","properties":{"analyticsOptOut":{"type":"boolean","description":"Opt out of product analytics. When true, no analytics events are recorded for this account, in the browser or server-side."},"advertisingOptOut":{"type":"boolean","description":"Do-not-sell/share election (CCPA). When true, the account is excluded from any advertising or audience use."}},"required":["analyticsOptOut","advertisingOptOut"],"additionalProperties":false,"description":"The user's account-level privacy choices. Write with `PATCH /v1/me/privacy`."}},"required":["id","email","name","isAutomattician","isSuperadmin","pendingDeletionAt","dashboardPrefs","privacy"],"additionalProperties":false},{"type":"null"}],"description":"Authenticated user identity for user-subject credentials. Null for team-subject or service-subject machine credentials. Creator metadata is retained only for audit attribution, not request identity."},"tenants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Tenant id."},"kind":{"type":"string","description":"Tenant kind."},"name":{"type":"string","description":"Tenant display name."},"access":{"type":"string","enum":["full","scoped"],"description":"Grant level the credential's policy holds in this tenant: `full` covers the whole tenant subtree, `scoped` covers specific principals or resources within it."}},"required":["id","kind","name","access"],"additionalProperties":false},"description":"Tenant grants derived from the credential's effective policy. The credential's home tenant is always included."},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Team id."},"tenantId":{"type":"string","description":"Owning tenant id."},"name":{"type":"string","description":"Team display name."},"slug":{"description":"Team slug.","type":["string","null"]},"role":{"description":"The caller's membership role. Null for policy-granted (non-member) access.","type":["string","null"]},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"The team's resolved plan code (plan summary)."}},"required":["id","tenantId","name","slug","role","plan"],"additionalProperties":false},"description":"Teams the credential can act in: session team memberships, or the teams a machine credential's policy grants."},"intercom":{"anyOf":[{"type":"object","properties":{"api_base":{"type":"string","format":"uri","description":"Intercom Messenger API base URL."},"app_id":{"type":"string","description":"Intercom workspace app id."},"user_id":{"type":"string","description":"Stable Intercom user id."},"email":{"description":"User email when available.","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"description":"User display name when available.","type":"string"},"created_at":{"description":"User creation time in Unix seconds.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"company":{"description":"Current team as an Intercom company.","type":"object","properties":{"company_id":{"type":"string","description":"Stable Intercom company id."},"name":{"type":"string","description":"Company display name."},"plan":{"description":"Resolved company plan code.","type":"string","enum":["free","go","plus","gold","enterprise","internal"]}},"required":["company_id","name"],"additionalProperties":false},"intercom_user_jwt":{"type":"string","minLength":1,"description":"Short-lived server-signed Messenger JWT."},"session_duration":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Messenger session cookie TTL in ms."},"expiresAt":{"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))$","description":"JWT expiry timestamp."}},"required":["api_base","app_id","user_id","intercom_user_jwt","session_duration","expiresAt"],"additionalProperties":false},{"type":"null"}],"description":"Intercom Messenger boot payload for authenticated browser sessions."},"joinableTeams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string","description":"Team id."},"name":{"type":"string","description":"Team display name."},"slug":{"description":"Team slug.","type":["string","null"]},"source":{"type":"string","enum":["invitation","automattician","parent_membership"],"description":"Why the caller can join the team."},"domainMatch":{"description":"The offer matches a verified company email domain.","type":"boolean"},"parent":{"description":"The team this offered subteam belongs to, or null for a top-level team.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}]}},"required":["teamId","name","slug","source"],"additionalProperties":false},"description":"Teams the user can join without waiting for anyone: a pending invitation or company-domain rule matching any verified email, every subteam of a team the user belongs to, or Automattician access to the Automattic team. Teams the user already belongs to are not listed."},"beta":{"type":"object","properties":{"gateEnabled":{"type":"boolean","const":false},"enrolled":{"type":"boolean","const":true},"eligibleTeams":{"maxItems":0,"type":"array","items":{}}},"required":["gateEnabled","enrolled","eligibleTeams"],"additionalProperties":false,"deprecated":true,"description":"Deprecated. Always `{ gateEnabled: false, enrolled: true, eligibleTeams: [] }`."}},"required":["subject","user","tenants","teams","intercom","joinableTeams","beta"],"additionalProperties":false},{"type":"null"}],"description":"The authenticated identity, exactly as `GET /v1/me` returns it. Null only for a claim-token caller, which has no identity."},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt"],"additionalProperties":false},"description":"The teams this credential can act for, newest-first — the same set `GET /v1/teams` returns. Empty for a claim-token caller."},"teamsPagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false,"description":"Paging for `teams`. `hasMore: true` means this credential reaches more teams than the boot payload carried; page the rest from `GET /v1/teams`."},"resolvedTeam":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"resolved"},"value":{"type":"object","properties":{"id":{"type":"string","description":"The team id (the Better Auth team id in the main tenant)."},"tenantId":{"type":"string","description":"The owning tenant id; `ten_main` for self-serve teams."},"name":{"type":"string","description":"The team display name."},"slug":{"type":"string","description":"URL-safe team slug, unique per tenant."},"role":{"type":"string","enum":["owner","admin","member"],"description":"Requesting member's role; member for non-session credentials."},"roleVia":{"type":"string","enum":["direct","parent"],"description":"`direct` when the role was granted on this team; `parent` when it comes from being an owner or admin of the parent team."},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"The parent team id."},"slug":{"type":"string","description":"The parent team slug."},"name":{"type":"string","description":"The parent team display name."}},"required":["id","slug","name"],"additionalProperties":false},{"type":"null"}],"description":"The team this subteam belongs to, or null for a top-level team."},"plan":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"partner":{"anyOf":[{"type":"object","properties":{"enabledAt":{"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))$","description":"The instant this team became a partner."}},"required":["enabledAt"],"additionalProperties":false},{"type":"null"}],"description":"Partner access for this team, or null when the team is not a partner."},"defaultDataLocation":{"type":"string","description":"Default placement region for new spaces; \"auto\" lets placement decide."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"logo":{"description":"Optional team logo URL.","type":["string","null"]},"metadata":{"description":"Opaque team metadata stored by the client.","type":["string","null"]},"stripeCustomerId":{"description":"Stripe customer id linked to this team; null until billing is initialized.","type":["string","null"]},"systemSpaceId":{"description":"The space that supplies this team's page, theme, and presentation defaults.","type":["string","null"]},"manifestStatus":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"The manifest key this item materializes."},"state":{"type":"string","enum":["pending","active","failed"],"description":"Where the last reconcile landed this key."},"detail":{"description":"Human-readable reason, present when the state warrants one (typically `failed`).","type":"string"},"since":{"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))$","description":"When this key last CHANGED state — stable across no-op re-runs, so it reads as ` since …`."},"challenge":{"description":"Sign this challenge with every new issuer key, using the supplied audience, then republish proofs. Existing active keys remain usable while rotation is pending.","type":"string"},"audience":{"description":"`tokenIssuers` only: the server-minted opaque audience for the issuer this key materialized. Not a secret — it rides in every partner token's `aud` claim and is verified server-side — and the partner needs it to sign the activation proof and to mint tokens, so it is served here rather than handed over out of band.","type":"string"}},"required":["key","state","since"],"additionalProperties":false},"description":"Per-key materialization status."},"sourceVersionId":{"description":"The system space's live version every item was converged from, or null when nothing is materialized.","type":["string","null"]}},"required":["items","sourceVersionId"],"additionalProperties":false,"description":"The status of the restricted manifest from the team's system space."},"presentation":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"logo":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"supportUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"claimOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"accessHandoffOrigin":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"problemDocsBaseUrl":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^https:\\/\\/[^\\s\"'<>\\\\*]+$"},"contacts":{"description":"Named contact URLs or addresses shown to claimants and partners.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"type":"string","minLength":1,"maxLength":2048}}},"additionalProperties":false,"description":"Partner-facing branding and links for the white-label surface."},{"type":"null"}],"description":"The presentation from the team's system space, or null when no value is active."}},"required":["id","tenantId","name","slug","role","roleVia","parent","plan","partner","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId","systemSpaceId","manifestStatus","presentation"],"additionalProperties":false}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unresolved"},"problem":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}}},"required":["type","title","status","detail","code"],"additionalProperties":false,"description":"Why this slot did not resolve: the same problem document the dedicated endpoint would have returned, minus the request id carried by the response itself."}},"required":["status","problem"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"not_requested"}},"required":["status"],"additionalProperties":false}],"description":"The team named by `teamRef`: the resolved value, the problem that stopped it, or not asked for."},"resolvedSpace":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"resolved"},"value":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unresolved"},"problem":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}}},"required":["type","title","status","detail","code"],"additionalProperties":false,"description":"Why this slot did not resolve: the same problem document the dedicated endpoint would have returned, minus the request id carried by the response itself."}},"required":["status","problem"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"not_requested"}},"required":["status"],"additionalProperties":false}],"description":"The space named by `spaceRef`: the resolved value, the problem that stopped it, or not asked for."},"spaceRuntime":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"resolved"},"value":{"type":"object","properties":{"liveVersionId":{"description":"Version that the live space URL now points to, if any.","type":["string","null"]},"pendingVersionId":{"description":"Version that live traffic is trying to publish now, if any.","type":["string","null"]},"liveUrl":{"description":"Live space URL. It moves to the latest version after a successful publish to `live`.","type":["string","null"]},"runtimeState":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Space operation-lifecycle status."},"liveVersionStatus":{"anyOf":[{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},{"type":"null"}]},"pendingVersionStatus":{"anyOf":[{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},{"type":"null"}]},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"app":{"anyOf":[{"type":"object","properties":{"capsule":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"serverRuntime":{"type":"string","const":"quickjs-rust"},"inspect":{"type":"object","properties":{"policy":{"type":"string","enum":["private","public"]}},"required":["policy"],"additionalProperties":false},"install":{"type":"object","properties":{"runtimeKind":{"type":"string","const":"zero"},"engine":{"type":"string","const":"quickjs-rust"},"storageRoot":{"type":"string","const":"__spacefast/zero"},"artifactPath":{"type":"string","const":"__spacefast/zero/artifact.json"},"configPath":{"type":"string","const":"__spacefast/zero/config.json"},"binary":{"type":"object","properties":{"path":{"type":"string","const":"__spacefast/zero/bin/stattic-runtime"},"compatibilityTarget":{"type":"object","properties":{"profile":{"type":"string","const":"linux-x86_64-gnu-v1"},"os":{"type":"string","const":"linux"},"cpu":{"type":"string","const":"x86_64"},"libc":{"type":"string","const":"glibc"},"linking":{"type":"string","const":"dynamic"},"requireExecutableBit":{"type":"boolean","const":true}},"required":["profile","os","cpu","libc","linking","requireExecutableBit"],"additionalProperties":false},"sha256":{"default":null,"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"required":{"type":"boolean","const":true}},"required":["path","compatibilityTarget","sha256","required"],"additionalProperties":false},"mysql":{"type":"object","properties":{"migrateAtFinalize":{"type":"boolean","const":true},"blockIncompatibleRollback":{"type":"boolean","const":true}},"required":["migrateAtFinalize","blockIncompatibleRollback"],"additionalProperties":false},"realtime":{"type":"object","properties":{"production":{"type":"string","const":"central"},"local":{"type":"string","const":"foreground-cli-ws"}},"required":["production","local"],"additionalProperties":false}},"required":["runtimeKind","engine","storageRoot","artifactPath","configPath","binary","mysql","realtime"],"additionalProperties":false},"tables":{"default":[],"type":"array","items":{"type":"string"}},"queries":{"default":[],"type":"array","items":{"type":"string"}},"mutations":{"default":[],"type":"array","items":{"type":"string"}},"actions":{"description":"Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.","type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["read","write"]},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["mode","method","path"],"additionalProperties":false}},"sockets":{"default":[],"type":"array","items":{"type":"string"}},"serverBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled server bundle size in bytes, or null when this version's metadata does not record it."},"clientBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled client bundle size in bytes, or null when this version's metadata does not record it."},"migrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"variables":{"type":"object","properties":{"source":{"type":"string","const":"stattic-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false},"realtime":{"type":"object","properties":{"mode":{"type":"string","enum":["central","cast","local"]},"centralUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"path":{"type":"string","minLength":1,"pattern":"^\\/.*"},"replayPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"replayUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"runPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"runUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"resourceKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"ticketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"socketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"spaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["mode","centralUrl"],"additionalProperties":false}},"required":["artifactId","appName","serverRuntime","inspect","install","tables","queries","mutations","endpoints","sockets","serverBundleSize","clientBundleSize","migrationCount","schemaHash","variables","realtime"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Zero capsule, if it carries one."},"worker":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"entry":{"type":"string","minLength":1},"compatibilityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"compatibilityFlags":{"default":[],"type":"array","items":{"type":"string"}},"routes":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"default":null,"anyOf":[{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},{"type":"null"}]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"subtree":{"default":false,"type":"boolean"}},"required":["method","path","subtree"],"additionalProperties":false}},"capabilities":{"default":{},"type":"object","properties":{"db":{"default":false,"type":"boolean"},"fetch":{"default":true,"type":"boolean"},"auth":{"default":false,"type":"boolean"},"env":{"default":false,"type":"boolean"},"realtime":{"default":false,"type":"boolean"},"logging":{"default":false,"type":"boolean"},"gravatar":{"default":false,"type":"boolean"},"spam":{"default":false,"type":"boolean"},"email":{"default":false,"type":"boolean"},"content":{"default":false,"type":"boolean"},"storage":{"default":false,"type":"boolean"},"connectors":{"default":false,"type":"boolean"},"crypto":{"default":false,"type":"boolean"}},"additionalProperties":false},"executionState":{"type":"string","enum":["absent","ready","serving"]},"bundleSize":{"type":"integer","minimum":0,"maximum":9007199254740991},"bundleSha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"variables":{"type":"object","properties":{"source":{"type":"string","const":"spacefast-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false}},"required":["artifactId","appName","entry","compatibilityDate","compatibilityFlags","routes","capabilities","executionState","bundleSize","bundleSha256","variables"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Functions worker, if it carries one."}},"required":["capsule","worker"],"additionalProperties":false},{"type":"null"}],"description":"What the live version runs: its Zero capsule and its Functions worker, each null when the published tree carries none of that product (both null for a space without a runtime). The whole object is null for callers whose credential does not carry `versions:read`, because app details read version contents, not serving state."},"pendingApp":{"anyOf":[{"type":"object","properties":{"capsule":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"serverRuntime":{"type":"string","const":"quickjs-rust"},"inspect":{"type":"object","properties":{"policy":{"type":"string","enum":["private","public"]}},"required":["policy"],"additionalProperties":false},"install":{"type":"object","properties":{"runtimeKind":{"type":"string","const":"zero"},"engine":{"type":"string","const":"quickjs-rust"},"storageRoot":{"type":"string","const":"__spacefast/zero"},"artifactPath":{"type":"string","const":"__spacefast/zero/artifact.json"},"configPath":{"type":"string","const":"__spacefast/zero/config.json"},"binary":{"type":"object","properties":{"path":{"type":"string","const":"__spacefast/zero/bin/stattic-runtime"},"compatibilityTarget":{"type":"object","properties":{"profile":{"type":"string","const":"linux-x86_64-gnu-v1"},"os":{"type":"string","const":"linux"},"cpu":{"type":"string","const":"x86_64"},"libc":{"type":"string","const":"glibc"},"linking":{"type":"string","const":"dynamic"},"requireExecutableBit":{"type":"boolean","const":true}},"required":["profile","os","cpu","libc","linking","requireExecutableBit"],"additionalProperties":false},"sha256":{"default":null,"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"required":{"type":"boolean","const":true}},"required":["path","compatibilityTarget","sha256","required"],"additionalProperties":false},"mysql":{"type":"object","properties":{"migrateAtFinalize":{"type":"boolean","const":true},"blockIncompatibleRollback":{"type":"boolean","const":true}},"required":["migrateAtFinalize","blockIncompatibleRollback"],"additionalProperties":false},"realtime":{"type":"object","properties":{"production":{"type":"string","const":"central"},"local":{"type":"string","const":"foreground-cli-ws"}},"required":["production","local"],"additionalProperties":false}},"required":["runtimeKind","engine","storageRoot","artifactPath","configPath","binary","mysql","realtime"],"additionalProperties":false},"tables":{"default":[],"type":"array","items":{"type":"string"}},"queries":{"default":[],"type":"array","items":{"type":"string"}},"mutations":{"default":[],"type":"array","items":{"type":"string"}},"actions":{"description":"Action names. Included when Accept requests application/json; spacefast-capsule-actions=1.","type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["read","write"]},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["mode","method","path"],"additionalProperties":false}},"sockets":{"default":[],"type":"array","items":{"type":"string"}},"serverBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled server bundle size in bytes, or null when this version's metadata does not record it."},"clientBundleSize":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Compiled client bundle size in bytes, or null when this version's metadata does not record it."},"migrationCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"schemaHash":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"variables":{"type":"object","properties":{"source":{"type":"string","const":"stattic-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false},"realtime":{"type":"object","properties":{"mode":{"type":"string","enum":["central","cast","local"]},"centralUrl":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"path":{"type":"string","minLength":1,"pattern":"^\\/.*"},"replayPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"replayUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"runPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"runUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"resourceKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"ticketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"socketPath":{"anyOf":[{"type":"string","minLength":1,"pattern":"^\\/.*"},{"type":"null"}]},"spaceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["mode","centralUrl"],"additionalProperties":false}},"required":["artifactId","appName","serverRuntime","inspect","install","tables","queries","mutations","endpoints","sockets","serverBundleSize","clientBundleSize","migrationCount","schemaHash","variables","realtime"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Zero capsule, if it carries one."},"worker":{"anyOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":1},"appName":{"type":"string","minLength":1},"entry":{"type":"string","minLength":1},"compatibilityDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"compatibilityFlags":{"default":[],"type":"array","items":{"type":"string"}},"routes":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"default":null,"anyOf":[{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},{"type":"null"}]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"subtree":{"default":false,"type":"boolean"}},"required":["method","path","subtree"],"additionalProperties":false}},"capabilities":{"default":{},"type":"object","properties":{"db":{"default":false,"type":"boolean"},"fetch":{"default":true,"type":"boolean"},"auth":{"default":false,"type":"boolean"},"env":{"default":false,"type":"boolean"},"realtime":{"default":false,"type":"boolean"},"logging":{"default":false,"type":"boolean"},"gravatar":{"default":false,"type":"boolean"},"spam":{"default":false,"type":"boolean"},"email":{"default":false,"type":"boolean"},"content":{"default":false,"type":"boolean"},"storage":{"default":false,"type":"boolean"},"connectors":{"default":false,"type":"boolean"},"crypto":{"default":false,"type":"boolean"}},"additionalProperties":false},"executionState":{"type":"string","enum":["absent","ready","serving"]},"bundleSize":{"type":"integer","minimum":0,"maximum":9007199254740991},"bundleSha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"variables":{"type":"object","properties":{"source":{"type":"string","const":"spacefast-variables"},"names":{"default":[],"type":"array","items":{"type":"string"}}},"required":["source","names"],"additionalProperties":false}},"required":["artifactId","appName","entry","compatibilityDate","compatibilityFlags","routes","capabilities","executionState","bundleSize","bundleSha256","variables"],"additionalProperties":false},{"type":"null"}],"description":"The live version's Functions worker, if it carries one."}},"required":["capsule","worker"],"additionalProperties":false},{"type":"null"}],"description":"What the pending version would run — the same projection as `app`, read from `pendingVersionId`'s version so a dashboard can show what an in-flight publish is about to serve. Null when no publish is in flight, and null for callers without `versions:read`, exactly like `app`."}},"required":["liveVersionId","pendingVersionId","liveUrl","runtimeState","liveVersionStatus","pendingVersionStatus","operation","app","pendingApp"],"additionalProperties":false}},"required":["status","value"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unresolved"},"problem":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}}},"required":["type","title","status","detail","code"],"additionalProperties":false,"description":"Why this slot did not resolve: the same problem document the dedicated endpoint would have returned, minus the request id carried by the response itself."}},"required":["status","problem"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"not_requested"}},"required":["status"],"additionalProperties":false}],"description":"Serving status of the resolved space: the resolved value, the problem that stopped it, or not asked for."}},"required":["me","teams","teamsPagination","resolvedTeam","resolvedSpace","spaceRuntime"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/spaces/{spaceId}/builds":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceBuilds","summary":"List a space's builds, newest first","description":"Lists queued, running, and terminal builds for a space in reverse creation order.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceBuild","summary":"Create a build from a source archive, repository, or managed source","description":"Creates a build that produces a version on success through the normal publish path. Repository inputs use the saved connection; source archive inputs receive an upload instruction the new build owns. Naming a managed `source` instead builds it from its connected production repository with the saved settings and live target. The caller cannot select source code, commands, settings, refs, or publish targets, and must send an `Idempotency-Key` header: a managed-source trigger without one fails with 422 `idempotency_key_required`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key, at most 255 characters, that makes this write safe to retry. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it `Idempotency-Replayed: true`. A request that reuses a key with a different body fails with 409 `idempotency_key_reused`. A duplicate request that arrives while the first is still in flight fails with 409 `idempotency_conflict_in_progress`. The server keeps each key for 24 hours.","schema":{"type":"string","maxLength":255}}],"requestBody":{"description":"A caller-described build, or a build triggered from a managed source.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"wordpress","description":"Build the Space's configured WordPress source."},"sourceUrl":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Configured WordPress URL that changed, as stored in the Space's data sources."}},"required":["source","sourceUrl"],"additionalProperties":false,"description":"Trigger a production build for a Space's configured WordPress source."},{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."},"sourceMetadata":{"description":"Source provenance for the produced version.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from a repository connection."},"repositoryConnectionId":{"type":"string","description":"Repository connection (`rpc_`) to build from."},"ref":{"description":"Branch, tag, or ref to build.","type":"string"},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when the ref is a commit SHA.","type":"string"}},"required":["kind","repositoryConnectionId"]}],"description":"What a new build should run against."},"settings":{"description":"Per-run settings overrides, persisted as `settingsSnapshot` after resolution.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}}},"target":{"description":"Omit to use the Space's channel mapping for the repository ref. Send channel: null or preview: true to prevent automatic promotion. An empty target object also prevents promotion.","type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}}},"diagnostics":{"description":"Diagnostics already known before the build is queued.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"]}},"wait":{"default":false,"description":"Wait for the build to finish before this request returns. Agents must keep this false and poll the build status. Synchronous clients can set it to true.","type":"boolean"},"source":{"description":"Omit `source` to describe the build yourself.","not":{}}},"required":["input"],"additionalProperties":false}],"description":"A caller-described build, or a build triggered from a managed source."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"wordpress","description":"Build the Space's configured WordPress source."},"sourceUrl":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Configured WordPress URL that changed, as stored in the Space's data sources."}},"required":["source","sourceUrl"],"additionalProperties":false,"description":"Trigger a production build for a Space's configured WordPress source."},{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."},"sourceMetadata":{"description":"Source provenance for the produced version.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from a repository connection."},"repositoryConnectionId":{"type":"string","description":"Repository connection (`rpc_`) to build from."},"ref":{"description":"Branch, tag, or ref to build.","type":"string"},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when the ref is a commit SHA.","type":"string"}},"required":["kind","repositoryConnectionId"]}],"description":"What a new build should run against."},"settings":{"description":"Per-run settings overrides, persisted as `settingsSnapshot` after resolution.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}}},"target":{"description":"Omit to use the Space's channel mapping for the repository ref. Send channel: null or preview: true to prevent automatic promotion. An empty target object also prevents promotion.","type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}}},"diagnostics":{"description":"Diagnostics already known before the build is queued.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"]}},"wait":{"default":false,"description":"Wait for the build to finish before this request returns. Agents must keep this false and poll the build status. Synchronous clients can set it to true.","type":"boolean"},"source":{"description":"Omit `source` to describe the build yourself.","not":{}}},"required":["input"],"additionalProperties":false}],"description":"A caller-described build, or a build triggered from a managed source."}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"wordpress","description":"Build the Space's configured WordPress source."},"sourceUrl":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Configured WordPress URL that changed, as stored in the Space's data sources."}},"required":["source","sourceUrl"],"additionalProperties":false,"description":"Trigger a production build for a Space's configured WordPress source."},{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."},"sourceMetadata":{"description":"Source provenance for the produced version.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from a repository connection."},"repositoryConnectionId":{"type":"string","description":"Repository connection (`rpc_`) to build from."},"ref":{"description":"Branch, tag, or ref to build.","type":"string"},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when the ref is a commit SHA.","type":"string"}},"required":["kind","repositoryConnectionId"]}],"description":"What a new build should run against."},"settings":{"description":"Per-run settings overrides, persisted as `settingsSnapshot` after resolution.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}}},"target":{"description":"Omit to use the Space's channel mapping for the repository ref. Send channel: null or preview: true to prevent automatic promotion. An empty target object also prevents promotion.","type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}}},"diagnostics":{"description":"Diagnostics already known before the build is queued.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"]}},"wait":{"default":false,"description":"Wait for the build to finish before this request returns. Agents must keep this false and poll the build status. Synchronous clients can set it to true.","type":"boolean"},"source":{"description":"Omit `source` to describe the build yourself.","not":{}}},"required":["input"],"additionalProperties":false}],"description":"A caller-described build, or a build triggered from a managed source."}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"upload":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}]}},"required":["build","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"upload":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}]}},"required":["build","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/spaces/{spaceId}/builds/preflight":{"get":{"security":[{"bearerAuth":[]}],"operationId":"preflightSpaceBuild","summary":"Check whether a managed source can trigger builds","description":"Checks the space's WordPress source and the connected production repository behind it, without exposing repository or build details. `wordpress` is the only managed source, so it is the only value `source` takes.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"source","in":"query","required":true,"schema":{"type":"string","enum":["wordpress"],"description":"Managed build source that decides what to build on the caller's behalf. `wordpress` is the only one."}},{"name":"sourceUrl","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Configured WordPress URL to check, as stored in the Space's data sources."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"ready":{"type":"boolean","const":true,"description":"The source can trigger production builds right now."}},"required":["ready"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/spaces/{spaceId}/uploads/{uploadId}":{"put":{"security":[{"bearerAuth":[]}],"operationId":"uploadSpaceBuildSourceArchive","summary":"Upload a build's source archive bytes","description":"Upload a gzip-compressed tar archive to the target returned when the build was created. Respect the upload instruction's maxBytes. The build is queued after the archive is stored.","requestBody":{"required":true,"description":"The source archive's raw bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"A complete gzip-compressed tar archive containing the project's source files."}}}},"responses":{"204":{"description":"The source archive was uploaded."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"uploadId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Spaces"]}},"/v1/builds/{buildId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getBuild","summary":"Get a build by id","description":"Returns the current state, immutable input, settings snapshot, target, diagnostics, and produced or reused version for a build.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/receipt":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getBuildReceipt","summary":"Get an archive publish build receipt","description":"Returns the same archive publish receipt shape while its Spacefast CI build runs and after the produced version settles.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"publicName":{"type":"string"},"defaultHostname":{"type":"string"},"liveUrl":{"type":["string","null"]}},"required":["id","slug","title","publicName","liveUrl"],"additionalProperties":false},"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"immutableUrl":{"description":"Permanent version URL, or null while the version is still being finalized.","type":["string","null"]},"ref":{"type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"type":["string","null"]}},"required":["id","status","immutableUrl","manifestHash"],"additionalProperties":false},"activation":{"type":"object","properties":{"channel":{"anyOf":[{"type":"string","enum":["live"]},{"type":"null"}],"description":"Channel this publish targeted; null means a ready version without promotion."},"outcome":{"type":"string","enum":["activated","unpromoted","superseded","pending"],"description":"activated: the live pointer moved to this version. unpromoted: ready without promotion — either the caller passed channel null, or the live channel's promotion policy held it; `reason` says which. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"description":"The version currently serving live traffic, or null when the space has none.","type":["string","null"]},"reason":{"description":"Why the outcome is not what the caller asked for. channel_promotion_manual: the live channel's promotion policy is manual, so this publish finalized ready but unpromoted; POST promote to move the pointer.","type":"string","enum":["channel_promotion_manual"]}},"required":["channel","outcome","currentLiveVersionId"],"additionalProperties":false},"next":{"type":"object","properties":{"action":{"type":"string","enum":["done","upload","finalize","poll"],"description":"What the caller does next: `done` (stop; this request intent is settled), `upload` (PUT upload targets, then follow the finalize link), `finalize` (all bytes are present, POST `url` to commit), or `poll` (server-side work is in flight, GET `url` after `retryAfter` seconds)."},"url":{"description":"The endpoint the action applies to.","type":"string"},"retryAfter":{"description":"Polling cadence in seconds; present only when action is poll.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hint":{"type":"string","maxLength":140,"description":"One plain sentence for an agent in the middle of a loop."}},"required":["action","hint"],"additionalProperties":false},"git":{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},"access":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":16,"maxLength":512},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["url","token","expiresAt"],"additionalProperties":false},"claim":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately."},"url":{"type":"string","format":"uri","description":"The site door: the live URL with the space key in /__/ form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key."},"claimUrl":{"type":"string","format":"uri","description":"Claim page link in /claim# form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once."},"expiresAt":{"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":["key","url","claimUrl","expiresAt"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"links":{"type":"object","properties":{"inspect":{"type":"string"},"build":{"type":"string"},"status":{"type":"string"},"version":{"type":"string"}},"required":["inspect","build","status"],"additionalProperties":false}},"required":["space","build","next","links"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/uploads/refresh":{"post":{"security":[{"bearerAuth":[]}],"operationId":"refreshBuildSourceUpload","summary":"Refresh a build's source upload instruction","description":"Returns a fresh upload instruction for an archive build that is still waiting for its source archive. Use it when the original instruction expired before the upload finished.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"upload":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}]}},"required":["build","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/cancel":{"post":{"security":[{"bearerAuth":[]}],"operationId":"cancelBuild","summary":"Cancel a build","description":"Cancels a queued, uploading, or running build and returns the latest build state. Canceling is idempotent: a build already in a terminal state comes back unchanged.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/retry":{"post":{"security":[{"bearerAuth":[]}],"operationId":"retryBuild","summary":"Retry a build with the original immutable input and settings","description":"Creates a new build from the original immutable input and settings snapshot, then queues it for execution or returns a fresh source archive upload instruction when needed.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"upload":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},{"type":"null"}]}},"required":["build","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/logs":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listBuildLogs","summary":"List a build's log lines, newest first","description":"Returns stored build runner log lines using the same log entry shape as version logs.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"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))$","description":"Instant when the version last changed state."},"level":{"type":"string","description":"Log severity: info or error."},"code":{"type":"string","description":"Stable version.{status} code for the line."},"message":{"type":"string","description":"Human-readable log line."}},"required":["timestamp","level","code","message"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/builds/{buildId}/events":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listBuildEvents","summary":"Read a build's lifecycle events, newest first","description":"Returns stored build runner log lines by default. Clients can request text/event-stream to follow live build.log and build status events until the build reaches a terminal state.","parameters":[{"name":"buildId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"timestamp":{"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))$","description":"Instant when the version last changed state."},"level":{"type":"string","description":"Log severity: info or error."},"code":{"type":"string","description":"Stable version.{status} code for the line."},"message":{"type":"string","description":"Human-readable log line."}},"required":["timestamp","level","code","message"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}},"text/event-stream":{"schema":{"type":"string","description":"Server-sent events. The stream emits `build.log` events that carry log entries, and `build` events that carry the current build. The stream ends when the build reaches a terminal state."}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Builds"]}},"/v1/tags/templates":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listTagTemplates","summary":"List supported tag templates and trigger presets","description":"Returns the built-in tag templates, provider presets, and event trigger defaults available to any tag graph.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["google-analytics","google-tag-manager","meta-pixel","tiktok-pixel","linkedin-insight","posthog","plausible","amplitude","segment","sentry-browser","intercom","hubspot","crisp","custom-javascript"]},"name":{"type":"string"},"category":{"type":"string","enum":["analytics","advertising","product","support","monitoring","custom"]},"description":{"type":"string"},"defaultTriggers":{"type":"array","items":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]}},"consentCategories":{"type":"array","items":{"type":"string","enum":["necessary","functional","analytics","marketing","personalization"]}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"default":"text","type":"string","enum":["text","url","secret","textarea","boolean"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"defaultValue":{"type":["string","boolean"]}},"required":["key","label","kind","required"],"additionalProperties":false}},"scriptHosts":{"default":[],"type":"array","items":{"type":"string"}},"advanced":{"default":false,"type":"boolean"}},"required":["id","name","category","description","defaultTriggers","consentCategories","fields","scriptHosts","advanced"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]},"triggerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","triggerId","name","description"],"additionalProperties":false}}},"required":["templates","triggers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/templates":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagTemplates","summary":"List tag templates available to a space","description":"Returns the built-in tag templates and trigger presets that can be used in the requested space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["google-analytics","google-tag-manager","meta-pixel","tiktok-pixel","linkedin-insight","posthog","plausible","amplitude","segment","sentry-browser","intercom","hubspot","crisp","custom-javascript"]},"name":{"type":"string"},"category":{"type":"string","enum":["analytics","advertising","product","support","monitoring","custom"]},"description":{"type":"string"},"defaultTriggers":{"type":"array","items":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]}},"consentCategories":{"type":"array","items":{"type":"string","enum":["necessary","functional","analytics","marketing","personalization"]}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"default":"text","type":"string","enum":["text","url","secret","textarea","boolean"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"defaultValue":{"type":["string","boolean"]}},"required":["key","label","kind","required"],"additionalProperties":false}},"scriptHosts":{"default":[],"type":"array","items":{"type":"string"}},"advanced":{"default":false,"type":"boolean"}},"required":["id","name","category","description","defaultTriggers","consentCategories","fields","scriptHosts","advanced"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]},"triggerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","triggerId","name","description"],"additionalProperties":false}}},"required":["templates","triggers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTags","summary":"Get a space's released tag graph","description":"Returns the current effective tag graph for the requested release environment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"description":"Release environment to resolve the graph for. Defaults to production.","type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tagSetId":{"type":["string","null"]},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"sdkRevision":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","system"]},"revisionId":{"type":["string","null"]}},"required":["type","revisionId"],"additionalProperties":false}}},"required":["tagSetId","environment","revisionId","graph","graphRevision","sdkRevision","sources"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/effective":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceEffectiveTags","summary":"Explain a space's effective tag graph","description":"Returns the effective graph with inherited team tags, space overrides, and source attribution for debugging.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"description":"Release environment to resolve the graph for. Defaults to production.","type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tagSetId":{"type":["string","null"]},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"sdkRevision":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","system"]},"revisionId":{"type":["string","null"]}},"required":["type","revisionId"],"additionalProperties":false}}},"required":["tagSetId","environment","revisionId","graph","graphRevision","sdkRevision","sources"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/consent-policy":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagConsentPolicy","summary":"Explain a space's tag consent policy","description":"Returns consent categories, per-tag gates, privacy-signal defaults, and consent diagnostics for the effective tag graph.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"description":"Release environment to resolve the graph for. Defaults to production.","type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":["string","null"]},"graphRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"policy":{"type":"object","properties":{"version":{"default":1,"type":"number","const":1},"categories":{"default":["necessary","functional","analytics","marketing","personalization"],"type":"array","items":{"type":"string","minLength":1}},"categoryDefinitions":{"default":{"necessary":{"label":"Necessary","description":"Required for basic site delivery, security, or visitor-requested actions.","defaultGranted":true,"required":true,"privacySignalDefaultDenied":false,"requiresConsentInGdprCountries":false},"functional":{"label":"Functional","description":"Supports optional site features such as chat, support, comments, or monitoring.","defaultGranted":true,"required":false,"privacySignalDefaultDenied":false,"requiresConsentInGdprCountries":false},"analytics":{"label":"Analytics","description":"Measures visits, usage, performance, funnels, or product behavior.","defaultGranted":true,"required":false,"privacySignalDefaultDenied":true,"requiresConsentInGdprCountries":true},"marketing":{"label":"Marketing","description":"Supports ads, retargeting, attribution, conversion measurement, or campaigns.","defaultGranted":true,"required":false,"privacySignalDefaultDenied":true,"requiresConsentInGdprCountries":true},"personalization":{"label":"Personalization","description":"Adapts content, recommendations, or experiences based on visitor behavior.","defaultGranted":true,"required":false,"privacySignalDefaultDenied":true,"requiresConsentInGdprCountries":true}},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"defaultGranted":{"type":"boolean"},"required":{"default":false,"type":"boolean"},"privacySignalDefaultDenied":{"default":false,"type":"boolean"},"requiresConsentInGdprCountries":{"default":false,"type":"boolean"}},"required":["label","description","defaultGranted","required","privacySignalDefaultDenied","requiresConsentInGdprCountries"],"additionalProperties":false}},"defaultByCategory":{"default":{"necessary":true,"functional":true,"analytics":true,"marketing":true,"personalization":true},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"regionDefaults":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"privacySignals":{"default":{"gpc":true,"dnt":true,"categories":["analytics","marketing","personalization"]},"type":"object","properties":{"gpc":{"default":true,"type":"boolean"},"dnt":{"default":true,"type":"boolean"},"categories":{"default":["analytics","marketing","personalization"],"type":"array","items":{"type":"string","minLength":1}}},"required":["gpc","dnt","categories"],"additionalProperties":false},"tags":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["version","categories","categoryDefinitions","defaultByCategory","regionDefaults","privacySignals","tags","diagnostics"],"additionalProperties":false}},"required":["environment","revisionId","graphRevision","policy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/effective/{tagId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceEffectiveTag","summary":"Read one effective tag by stable id","description":"Looks up one tag from the effective released graph after inheritance and overrides are applied.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tagId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"description":"Release environment to resolve the graph for. Defaults to production.","type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tag":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"environment":{"type":"string","enum":["production","preview","development"]},"source":{"type":"string","enum":["system","team","space","unknown"]}},"required":["tag","environment","source"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/inheritance":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagInheritance","summary":"Read team tag inheritance for a space","description":"Returns whether the space inherits team-level tags and which team tag set currently contributes to it.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"teamId":{"type":["string","null"]},"inherited":{"type":"boolean"},"teamTagSetId":{"type":["string","null"]},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string"},"disabled":{"default":false,"type":"boolean"},"reason":{"default":null,"type":["string","null"]}},"required":["tagId","disabled","reason"],"additionalProperties":false}}},"required":["spaceId","teamId","inherited","teamTagSetId","overrides"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"updateSpaceTagInheritance","summary":"Update team tag inheritance for a space","description":"Enables or disables team-level tag inheritance for the space while preserving its local tag graph.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"teamId":{"type":["string","null"]},"inherited":{"type":"boolean"},"teamTagSetId":{"type":["string","null"]},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string"},"disabled":{"default":false,"type":"boolean"},"reason":{"default":null,"type":["string","null"]}},"required":["tagId","disabled","reason"],"additionalProperties":false}}},"required":["spaceId","teamId","inherited","teamTagSetId","overrides"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/activity":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagActivity","summary":"List tag activity","description":"Returns recent tag manager audit events for drafts, approvals, releases, rollbacks, and debug sessions.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"revisionId":{"type":["string","null"]},"environment":{"anyOf":[{"type":"string","enum":["production","preview","development"]},{"type":"null"}]},"message":{"type":"string"},"actor":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","revisionId","environment","message","actor","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/releases":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagReleases","summary":"List tag release pointers","description":"Returns the current released tag revision pointer for each environment in the space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/releases/{environment}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagRelease","summary":"Read a tag release pointer","description":"Returns the released tag revision pointer and release metadata for one space environment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"releaseSpaceTagRevision","summary":"Release an approved tag revision","description":"Moves a space environment to an approved tag revision and records the release transition.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagRevisions","summary":"List tag revisions","description":"Lists draft, review, approved, released, and abandoned tag revisions for the space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"schema":{"description":"Return only revisions in this review state.","type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"createSpaceTagRevision","summary":"Create a draft tag revision","description":"Creates a mutable space tag revision from an optional base revision and initial graph.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}}},"required":true},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagRevision","summary":"Read a tag revision","description":"Returns one space tag revision with its lifecycle status, metadata, and graph revision.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"updateSpaceTagRevision","summary":"Update mutable tag revision metadata","description":"Updates the title or description for a space tag revision that has not been abandoned.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/graph":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagRevisionGraph","summary":"Read a tag revision graph","description":"Returns the editable graph and revision counter for a specific space tag revision.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"replaceSpaceTagRevisionGraph","summary":"Replace a mutable tag graph","description":"Replaces a mutable space tag graph when the supplied If-Match graph revision is current.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"patchSpaceTagRevisionGraph","summary":"Patch a mutable tag graph","description":"Applies a graph replacement patch against a known base revision for collaborative editing.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/validate":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"validateSpaceTagRevision","summary":"Validate a tag revision","description":"Runs policy, template, consent, trigger, and dependency validation for the selected space tag revision.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/diff":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"diffSpaceTagRevision","summary":"Diff a tag revision","description":"Compares a space tag revision with its base revision and reports graph-level changes.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"baseRevisionId":{"type":["string","null"]},"targetRevisionId":{"type":"string"},"addedTagIds":{"type":"array","items":{"type":"string"}},"removedTagIds":{"type":"array","items":{"type":"string"}},"changedTagIds":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["baseRevisionId","targetRevisionId","addedTagIds","removedTagIds","changedTagIds","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/releases/{environment}/rollback":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"rollbackSpaceTagRelease","summary":"Roll back a tag release pointer","description":"Moves a space environment back to a previous approved tag revision with optional compare-and-swap protection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/debug":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"createSpaceTagDebugSession","summary":"Create a tag debug session for a released environment","description":"Creates a temporary debug token for the released space tag graph in the requested environment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/apply":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"applySpaceTagConfig","summary":"Apply declarative tag configuration","description":"Creates or updates a space tag revision from declarative configuration and can optionally submit or release it.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","validation","release"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/submit":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"submitSpaceTagRevision","summary":"Submit a tag revision","description":"Moves a draft space tag revision into review after validating that the graph is ready.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/approve":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"approveSpaceTagRevision","summary":"Approve a tag revision","description":"Approves a reviewed space tag revision so it can be released to an environment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/abandon":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"abandonSpaceTagRevision","summary":"Abandon a mutable tag revision","description":"Marks a draft or review space tag revision as abandoned without changing released environments.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/preview-sessions":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"createSpaceTagPreviewSession","summary":"Create a tag preview session","description":"Creates a temporary preview token that loads an unreleased space tag revision for a chosen URL or environment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagPreviewSessions","summary":"List a tag revision's preview sessions","description":"Lists the preview sessions still open on a space tag revision, newest first. Revoked and expired sessions drop out.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/spaces/{spaceId}/tags/revisions/{revisionId}/preview-sessions/{sessionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagPreviewSession","summary":"Read a tag preview session","description":"Returns the state, expiry, target URL, and environment for a space tag preview session.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"delete":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"revokeSpaceTagPreviewSession","summary":"Revoke a tag preview session","description":"Revokes a space tag preview session before its natural expiry so its token stops working.","responses":{"204":{"description":"The preview session was revoked."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Tags"]}},"/v1/teams/{teamId}/tags/templates":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamTagTemplates","summary":"List tag templates available to a team","description":"Returns the built-in tag templates and trigger presets that can be used in the requested team scope.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["google-analytics","google-tag-manager","meta-pixel","tiktok-pixel","linkedin-insight","posthog","plausible","amplitude","segment","sentry-browser","intercom","hubspot","crisp","custom-javascript"]},"name":{"type":"string"},"category":{"type":"string","enum":["analytics","advertising","product","support","monitoring","custom"]},"description":{"type":"string"},"defaultTriggers":{"type":"array","items":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]}},"consentCategories":{"type":"array","items":{"type":"string","enum":["necessary","functional","analytics","marketing","personalization"]}},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"kind":{"default":"text","type":"string","enum":["text","url","secret","textarea","boolean"]},"required":{"default":false,"type":"boolean"},"placeholder":{"type":"string"},"help":{"type":"string"},"defaultValue":{"type":["string","boolean"]}},"required":["key","label","kind","required"],"additionalProperties":false}},"scriptHosts":{"default":[],"type":"array","items":{"type":"string"}},"advanced":{"default":false,"type":"boolean"}},"required":["id","name","category","description","defaultTriggers","consentCategories","fields","scriptHosts","advanced"],"additionalProperties":false}},"triggers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["page_view","outbound_click","form_submit","file_download","scroll_depth"]},"triggerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","triggerId","name","description"],"additionalProperties":false}}},"required":["templates","triggers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/releases":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamTagReleases","summary":"List team tag releases","description":"Returns the current released tag revision pointer for each environment at the team scope.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/activity":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamTagActivity","summary":"List team tag activity","description":"Returns recent team-level tag manager audit events for drafts, approvals, releases, and rollbacks.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"revisionId":{"type":["string","null"]},"environment":{"anyOf":[{"type":"string","enum":["production","preview","development"]},{"type":"null"}]},"message":{"type":"string"},"actor":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","revisionId","environment","message","actor","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/releases/{environment}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamTagRelease","summary":"Read a team tag release","description":"Returns the released tag revision pointer and release metadata for one team environment.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"releaseTeamTagRevision","summary":"Release an approved team tag revision","description":"Moves a team environment to an approved tag revision so inheriting spaces can use it.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/releases/{environment}/rollback":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"rollbackTeamTagRelease","summary":"Roll back a team tag release pointer","description":"Moves a team environment back to a previous approved tag revision with optional compare-and-swap protection.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"environment","in":"path","required":true,"schema":{"type":"string","enum":["production","preview","development"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revisionId":{"type":"string","minLength":1},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["revisionId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamTagRevisions","summary":"List team tag revisions","description":"Lists draft, review, approved, released, and abandoned tag revisions for the team.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"schema":{"description":"Return only revisions in this review state.","type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"createTeamTagRevision","summary":"Create a draft team tag revision","description":"Creates a mutable team tag revision from an optional base revision and initial graph.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag revision","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}}}}},"required":true},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamTagRevision","summary":"Read a team tag revision","description":"Returns one team tag revision with its lifecycle status, metadata, and graph revision.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"updateTeamTagRevision","summary":"Update mutable team tag revision metadata","description":"Updates the title or description for a team tag revision that has not been abandoned.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/graph":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamTagRevisionGraph","summary":"Read a team tag graph","description":"Returns the editable graph and revision counter for a specific team tag revision.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"replaceTeamTagRevisionGraph","summary":"Replace a mutable team tag graph","description":"Replaces a mutable team tag graph when the supplied If-Match graph revision is current.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["graph"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"patchTeamTagRevisionGraph","summary":"Patch a mutable team tag graph","description":"Applies a graph replacement patch against a known base revision for collaborative team editing.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseGraphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"operations":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace"]},"path":{"type":"string","enum":["graph"]},"value":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"maxItems":256,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false,"description":"Tag graph v1 write input. The server enforces these limits: 262144 encoded bytes, 256 tags, 256 triggers, 256 variables, and 64 system modules. The server also enforces 256 items per nested array, 64 keys per object, 65536 encoded bytes per string, and 16 nested levels. Unknown top-level fields are rejected."}},"required":["op","path","value"]}}},"required":["baseGraphRevision","operations"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revisionId":{"type":"string"},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["revisionId","graph","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/validate":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"validateTeamTagRevision","summary":"Validate a team tag revision","description":"Runs policy, template, consent, trigger, and dependency validation for the selected team tag revision.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/diff":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"diffTeamTagRevision","summary":"Diff a team tag revision","description":"Compares a team tag revision with its base revision and reports graph-level changes.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"baseRevisionId":{"type":["string","null"]},"targetRevisionId":{"type":"string"},"addedTagIds":{"type":"array","items":{"type":"string"}},"removedTagIds":{"type":"array","items":{"type":"string"}},"changedTagIds":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["baseRevisionId","targetRevisionId","addedTagIds","removedTagIds","changedTagIds","graphRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/apply":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"applyTeamTagConfig","summary":"Apply declarative team tag configuration","description":"Creates or updates a team tag revision from declarative configuration and can optionally submit or release it.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"config":{},"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"submit":{"default":false,"type":"boolean"},"releaseEnvironment":{"type":"string","enum":["production","preview","development"]},"expectedCurrentRevisionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"revisionId":{"type":"string"},"previousRevisionId":{"type":["string","null"]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"type":["string","null"]},"releasedAt":{"type":"string"},"artifact":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["compiling","ready","failed","superseded"]}},"required":["id","revision","status"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tagSetId","environment","revisionId","previousRevisionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false},{"type":"null"}]}},"required":["revision","validation","release"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/submit":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"submitTeamTagRevision","summary":"Submit a team tag revision","description":"Moves a draft team tag revision into review after validating that the graph is ready.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/approve":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"approveTeamTagRevision","summary":"Approve a team tag revision","description":"Approves a reviewed team tag revision so it can be released to an environment.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/abandon":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"abandonTeamTagRevision","summary":"Abandon a team tag revision","description":"Marks a draft or review team tag revision as abandoned without changing released environments.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevisionId":{"type":["string","null"]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"type":["string","null"]},"graph":{"type":"object","properties":{"format":{"default":"spacefast.tag_graph.v1","type":"string","const":"spacefast.tag_graph.v1"},"tags":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"triggers":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"variables":{"default":[],"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"systemModules":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"consentPolicy":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["format","tags","triggers","variables","systemModules"],"additionalProperties":{}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"validation":{"type":"object","properties":{"valid":{"type":"boolean"},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"requiredApprovals":{"type":"array","items":{"type":"string"}},"graphRevision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["valid","diagnostics","requiredApprovals","graphRevision"],"additionalProperties":false},"effectiveInputDigest":{"type":["string","null"]},"staticDigest":{"type":["string","null"]},"dynamicDigest":{"type":["string","null"]},"sdkRevision":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"type":["string","null"]},"immutableAt":{"type":["string","null"]}},"required":["id","tagSetId","revisionNumber","baseRevisionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/preview-sessions":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"createTeamTagPreviewSession","summary":"Create a team tag preview session","description":"Creates a temporary preview token that loads an unreleased team tag revision for a chosen URL or environment.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"listTeamTagPreviewSessions","summary":"List a team tag revision's preview sessions","description":"Lists the preview sessions still open on a team tag revision, newest first. Revoked and expired sessions drop out.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]}},"/v1/teams/{teamId}/tags/revisions/{revisionId}/preview-sessions/{sessionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"getTeamTagPreviewSession","summary":"Read a team tag preview session","description":"Returns the state, expiry, target URL, and environment for a team tag preview session.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"revisionId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"previewUrl":{"type":"string"},"sdkRevision":{"type":"string"},"cacheMode":{"type":"string","const":"public, max-age=0, s-maxage=60, must-revalidate"},"websocket":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]}},"required":["id","revisionId","environment","previewUrl","sdkRevision","cacheMode","websocket","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Tags"]},"delete":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"revokeTeamTagPreviewSession","summary":"Revoke a team tag preview session","description":"Revokes a team tag preview session before its natural expiry so its token stops working.","responses":{"204":{"description":"The preview session was revoked."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"revisionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sessionId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Tags"]}},"/v1/teams/{teamId}/identity-connections":{"get":{"operationId":"listTeamIdentityConnections","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"summary":"List identity connections","description":"Lists the team's active OIDC and signed-identity connections without exposing client secrets.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"teamId":{"type":"string","minLength":1},"type":{"type":"string","enum":["oidc","signer"]},"name":{"type":"string","minLength":1},"issuer":{"type":"string","minLength":1},"clientId":{"type":["string","null"]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"type":["string","null"]},"publicKeys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","teamId","type","name","issuer","clientId","clientSecretSet","authorizeUrl","publicKeys","sessionTtlSeconds","createdAt","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"operationId":"createTeamIdentityConnection","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"summary":"Create an identity connection","description":"Connects an outside sign-in system to the team so Grants can admit its people to the team's Spaces: an OIDC provider (`type: oidc` with issuer, client ID, and client secret) or the team's own signer (`type: signer` with issuer, authorize URL, and public keys). The client secret is stored write-only; responses report only `clientSecretSet`. The connection admits no one by itself; only Grants that name it do. It changes who can sign in, so create one only at the user's request.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"oidc"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"required":["type","name","issuer","clientId","clientSecret"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"signer"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":1800}},"required":["type","name","issuer","authorizeUrl","publicKeys"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"oidc"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"required":["type","name","issuer","clientId","clientSecret"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"signer"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":1800}},"required":["type","name","issuer","authorizeUrl","publicKeys"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"oidc"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"required":["type","name","issuer","clientId","clientSecret"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"signer"},"name":{"type":"string","minLength":1,"maxLength":200},"issuer":{"type":"string","minLength":1,"maxLength":1024},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":1800}},"required":["type","name","issuer","authorizeUrl","publicKeys"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"teamId":{"type":"string","minLength":1},"type":{"type":"string","enum":["oidc","signer"]},"name":{"type":"string","minLength":1},"issuer":{"type":"string","minLength":1},"clientId":{"type":["string","null"]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"type":["string","null"]},"publicKeys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","teamId","type","name","issuer","clientId","clientSecretSet","authorizeUrl","publicKeys","sessionTtlSeconds","createdAt","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/identity-connections/{connectionId}":{"patch":{"operationId":"updateTeamIdentityConnection","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"summary":"Update an identity connection","description":"Renames a team identity connection, rotates its OIDC client ID or client secret, replaces its signer authorize URL or public keys, or changes its session length. Grants that name the connection keep working. The client secret is write-only and never returned. It changes how people sign in, so update it only at the user's request.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"clientId":{"type":"string","minLength":1,"maxLength":512},"clientSecret":{"type":"string","minLength":1,"maxLength":2048},"authorizeUrl":{"type":"string","minLength":1,"maxLength":2048},"publicKeys":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","minimum":60,"maximum":86400}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"teamId":{"type":"string","minLength":1},"type":{"type":"string","enum":["oidc","signer"]},"name":{"type":"string","minLength":1},"issuer":{"type":"string","minLength":1},"clientId":{"type":["string","null"]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"type":["string","null"]},"publicKeys":{"type":"array","items":{"type":"object","properties":{"kid":{"type":"string","minLength":1,"maxLength":64},"publicKey":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["kid","publicKey"],"additionalProperties":false}},"sessionTtlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"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))$"},"rotatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","teamId","type","name","issuer","clientId","clientSecretSet","authorizeUrl","publicKeys","sessionTtlSeconds","createdAt","rotatedAt","lastUsedAt","revokedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"operationId":"revokeTeamIdentityConnection","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"summary":"Revoke an identity connection","description":"Revokes a team identity connection so its external audience Grants can no longer authenticate viewers.","responses":{"204":{"description":"The identity connection was revoked."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Teams"]}},"/v1/spaces/{spaceId}/collaboration":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceCollaboration","summary":"Get Comments settings","description":"Returns where a Space's Comments are on (`surface`), its embed origins, spam filter and notification preferences, plus the `revision` to send back when you update them.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"castResourceId":{"type":["string","null"]},"castResourceKey":{"type":["string","null"]},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"default":"previews","type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"type":"object","properties":{"newThreads":{"default":true,"type":"boolean"},"newReplies":{"default":true,"type":"boolean"},"statusChanges":{"default":true,"type":"boolean"}},"additionalProperties":false}},"required":["surface","embedOrigins"],"additionalProperties":false},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["spaceId","revision","castResourceId","castResourceKey","settings","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"patch":{"security":[{"bearerAuth":[]}],"operationId":"updateSpaceCollaboration","summary":"Update Comments settings","description":"Changes only the settings you send, and they apply right away, no republish needed. Send the `revision` you last read as `expectedRevision`: if someone changed the settings since, you get a 409 with the current ones.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The `revision` from your last read of these settings. If someone changed them since, the update returns 409 with the current settings."},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"description":"Where Comments are on: `off`, `previews` (Version URLs only), or `everywhere` (Version URLs and the live Space). Applies right away, without a republish.","type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"description":"Exact https origins allowed to embed this Space's Comments.","maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"description":"Merged key by key: a key you leave out keeps its value.","type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"description":"Only the settings to change. Omitted settings keep their values."}},"required":["expectedRevision","settings"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The `revision` from your last read of these settings. If someone changed them since, the update returns 409 with the current settings."},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"description":"Where Comments are on: `off`, `previews` (Version URLs only), or `everywhere` (Version URLs and the live Space). Applies right away, without a republish.","type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"description":"Exact https origins allowed to embed this Space's Comments.","maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"description":"Merged key by key: a key you leave out keeps its value.","type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"description":"Only the settings to change. Omitted settings keep their values."}},"required":["expectedRevision","settings"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The `revision` from your last read of these settings. If someone changed them since, the update returns 409 with the current settings."},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"description":"Where Comments are on: `off`, `previews` (Version URLs only), or `everywhere` (Version URLs and the live Space). Applies right away, without a republish.","type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"description":"Exact https origins allowed to embed this Space's Comments.","maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"description":"Merged key by key: a key you leave out keeps its value.","type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false,"description":"Only the settings to change. Omitted settings keep their values."}},"required":["expectedRevision","settings"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"spaceId":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"castResourceId":{"type":["string","null"]},"castResourceKey":{"type":["string","null"]},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"default":"previews","type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"type":"object","properties":{"newThreads":{"default":true,"type":"boolean"},"newReplies":{"default":true,"type":"boolean"},"statusChanges":{"default":true,"type":"boolean"}},"additionalProperties":false}},"required":["surface","embedOrigins"],"additionalProperties":false},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["spaceId","revision","castResourceId","castResourceKey","settings","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/realtime/token":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceRealtimeToken","summary":"Mint a read-only realtime notice token","description":"Mints a read-only realtime token for the Space's notice room.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"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))$"},"cast":{"type":"object","properties":{"resource":{"type":"string"},"room":{"type":"string"},"wsUrl":{"type":["string","null"]}},"required":["resource","room","wsUrl"],"additionalProperties":false}},"required":["token","expiresAt","cast"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceComments","summary":"List space comments","description":"Returns comment threads across a Space, newest activity first, with status, version, page, author, unread, and text filters.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"versionId","in":"query","required":false,"schema":{"description":"Return only threads anchored to this version.","type":"string"}},{"name":"status","in":"query","required":false,"schema":{"description":"Return only threads in this lifecycle state: `open`, or `archived` for resolved.","type":"string","enum":["open","archived"]}},{"name":"filter","in":"query","required":false,"schema":{"description":"Named view. `open` and `archived` (resolved) select a lifecycle state and win over `status`; `spam` lists the moderation-held threads, which requires comment-moderator access.","type":"string","enum":["open","archived","spam"]}},{"name":"pagePath","in":"query","required":false,"schema":{"description":"Return only threads anchored to this page path, for example `/pricing`.","type":"string","maxLength":2048}},{"name":"q","in":"query","required":false,"schema":{"description":"Free-text search across thread and comment bodies.","type":"string","maxLength":160}},{"name":"author","in":"query","required":false,"schema":{"description":"Return only threads started by this author name.","type":"string","maxLength":160}},{"name":"unread","in":"query","required":false,"schema":{"description":"Return only threads that are unread for the caller. Resolved threads are never unread.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/versions/{versionId}/comments":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceVersionComments","summary":"List version comments","description":"Returns comment threads for a specific version and an optional page path.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"schema":{"description":"Return only threads in this lifecycle state: `open`, or `archived` for resolved.","type":"string","enum":["open","archived"]}},{"name":"filter","in":"query","required":false,"schema":{"description":"Named view. `open` and `archived` (resolved) select a lifecycle state and win over `status`; `spam` lists the moderation-held threads, which requires comment-moderator access.","type":"string","enum":["open","archived","spam"]}},{"name":"pagePath","in":"query","required":false,"schema":{"description":"Return only threads anchored to this page path, for example `/pricing`.","type":"string","maxLength":2048}},{"name":"q","in":"query","required":false,"schema":{"description":"Free-text search across thread and comment bodies.","type":"string","maxLength":160}},{"name":"author","in":"query","required":false,"schema":{"description":"Return only threads started by this author name.","type":"string","maxLength":160}},{"name":"unread","in":"query","required":false,"schema":{"description":"Return only threads that are unread for the caller. Resolved threads are never unread.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceVersionComment","summary":"Create a version comment","description":"Opens a comment thread on a version. Leave out `target` to comment on the whole page; `mentions` notifies the people you name.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","description":"Page the thread is anchored to. Ignored when `target` is a file anchor: that anchor's `file.path` is the page path, so the thread is always filed under the file it is about.","type":"string","minLength":1,"maxLength":2048},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"description":"Where in the page or file this thread points. Omit it for a comment on the whole page: the API stores a page anchor. A file anchor files the thread under its `file.path`; any other shape is stored and returned as sent.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","description":"Page the thread is anchored to. Ignored when `target` is a file anchor: that anchor's `file.path` is the page path, so the thread is always filed under the file it is about.","type":"string","minLength":1,"maxLength":2048},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"description":"Where in the page or file this thread points. Omit it for a comment on the whole page: the API stores a page anchor. A file anchor files the thread under its `file.path`; any other shape is stored and returned as sent.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","description":"Page the thread is anchored to. Ignored when `target` is a file anchor: that anchor's `file.path` is the page path, so the thread is always filed under the file it is about.","type":"string","minLength":1,"maxLength":2048},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"description":"Where in the page or file this thread points. Omit it for a comment on the whole page: the API stores a page anchor. A file anchor files the thread under its `file.path`; any other shape is stored and returned as sent.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/versions/{versionId}/comments/export":{"get":{"security":[{"bearerAuth":[]}],"operationId":"exportSpaceVersionComments","summary":"Export version comments","description":"Returns comment threads for a version as JSON or Markdown content.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"format","in":"query","required":false,"schema":{"default":"markdown","description":"Export shape: `markdown` to read, `json` to process.","type":"string","enum":["markdown","json"]}},{"name":"status","in":"query","required":false,"schema":{"description":"Export only threads in this lifecycle state.","type":"string","enum":["open","archived"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"format":{"type":"string","enum":["markdown","json"]},"content":{"type":"string"}},"required":["format","content"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Versions"]}},"/v1/spaces/{spaceId}/comments/mentionable":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listSpaceCommentMentionable","summary":"List people you can mention","description":"Returns the team members who can open this Space, which is who a comment or reply may name in `mentions`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["userId","name","email","avatarUrl"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/export":{"get":{"security":[{"bearerAuth":[]}],"operationId":"exportSpaceComments","summary":"Export space comments","description":"Returns comment threads across a space as JSON or Markdown content.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"format","in":"query","required":false,"schema":{"default":"markdown","description":"Export shape: `markdown` to read, `json` to process.","type":"string","enum":["markdown","json"]}},{"name":"status","in":"query","required":false,"schema":{"description":"Export only threads in this lifecycle state.","type":"string","enum":["open","archived"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"format":{"type":"string","enum":["markdown","json"]},"content":{"type":"string"}},"required":["format","content"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/{threadId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceComment","summary":"Get a comment","description":"Returns one comment thread. Accepts its `cmt_` id (or the Cast thread id).","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"patch":{"security":[{"bearerAuth":[]}],"operationId":"updateSpaceComment","summary":"Resolve or reopen a comment","description":"`status: archived` resolves a thread and `open` reopens it. Team admins also pass spam verdicts here: `spam` holds the thread, `open` releases a held one, and `spamCommentId` narrows a verdict to one held reply.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","archived","spam"]},"spamCommentId":{"type":"string","minLength":1}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","archived","spam"]},"spamCommentId":{"type":"string","minLength":1}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","archived","spam"]},"spamCommentId":{"type":"string","minLength":1}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/{threadId}/replies":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceCommentReply","summary":"Reply to a comment","description":"Adds a reply to a comment thread; `mentions` notifies the people you name. Returns the reply in the same shape a thread's `comments` use.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":16000},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":16000},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":16000},"mentions":{"description":"Spacefast user ids to @mention. Each must be on the Space's team and able to open it; `GET /v1/spaces/{spaceId}/comments/mentionable` lists who qualifies. Mentioned people are notified.","maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["inserted","existing"]},"comment":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"required":["status","comment"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/{threadId}/reactions":{"post":{"security":[{"bearerAuth":[]}],"operationId":"updateSpaceCommentReaction","summary":"Update a comment reaction","description":"Adds or removes a reaction on a comment thread.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emoji":{"type":"string","enum":["👍","❤️","🎉","👀","🚀","🙏"]},"op":{"type":"string","enum":["add","remove"]}},"required":["emoji","op"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emoji":{"type":"string","enum":["👍","❤️","🎉","👀","🚀","🙏"]},"op":{"type":"string","enum":["add","remove"]}},"required":["emoji","op"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emoji":{"type":"string","enum":["👍","❤️","🎉","👀","🚀","🙏"]},"op":{"type":"string","enum":["add","remove"]}},"required":["emoji","op"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/{threadId}/read":{"post":{"security":[{"bearerAuth":[]}],"operationId":"markSpaceCommentRead","summary":"Mark a comment read","description":"Marks a comment thread read for you.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"type":["string","null"]},"channel":{"type":["string","null"]},"pagePath":{"type":"string","maxLength":2048},"url":{"type":["string","null"]},"status":{"type":"string","enum":["open","archived"],"description":"`open`, or `archived` for a resolved thread."},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread."},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Messages by others since you last read the thread. Zero exactly when `unread` is false."},"body":{"type":["string","null"]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"profileId":{"type":["string","null"]},"name":{"type":["string","null"]},"username":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"color":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["kind","id","profileId","name","username","avatarUrl","color"],"additionalProperties":false},{"type":"null"}]},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."},"reactions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"actors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"name":{"type":["string","null"]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"attachmentOrigin":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"comments":{"type":"array","items":{"type":"object","properties":{"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"name":{"type":"string","minLength":1,"maxLength":160},"contentType":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":1,"maximum":5242880},"kind":{"type":"string","enum":["screenshot","image","file"]},"crop":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"}},"required":["x","y","width","height"],"additionalProperties":false},"url":{"type":["string","null"]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}},"mentions":{"type":"array","items":{"type":"string"},"description":"Spacefast user ids this thread or reply @mentions."}},"required":["attachments","mentions"],"additionalProperties":{}}},"permalink":{"type":["string","null"]},"dashboardUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"The thread in the dashboard, opened with the reader's own sign-in. Null without a team."},"createdAt":{"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))$","description":"When the thread started. Never changes."},"lastActivityAt":{"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))$","description":"When the latest message was posted. Resolving, reopening and reactions don't move it."},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When anything on the thread last changed. Lists are ordered by it."}},"required":["id","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","mentions","reactions","attachmentOrigin","attachments","comments","permalink","dashboardUrl","createdAt","lastActivityAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/embed-config":{"get":{"security":[{}],"operationId":"getSpaceCommentsEmbedConfig","summary":"Read third-party embed configuration","description":"Returns the Collab overlay configuration for an allowlisted embedding site. Answers only for origins the Space owner listed; every other caller gets an indistinguishable 404.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160}},{"name":"pagePath","in":"query","required":false,"schema":{"description":"Page path the embedding site will render comments for.","type":"string","maxLength":2048}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"resource_key":{"type":["string","null"]},"room_key":{"type":["string","null"]},"version":{"type":"object","properties":{"id":{"type":["string","null"]},"current":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","current","url"],"additionalProperties":false},"space":{"type":"object","properties":{"live_url":{"type":["string","null"]}},"required":["live_url"],"additionalProperties":false},"theme":{"type":"object","properties":{"accent":{"type":["string","null"]},"hide_branding":{"type":"boolean"}},"required":["accent","hide_branding"],"additionalProperties":false},"ws_url":{"type":["string","null"]},"endpoints":{"type":"object","properties":{"ticket":{"type":"string"}},"required":["ticket"],"additionalProperties":false},"features":{"type":"object","properties":{"picker":{"type":"boolean"},"drawing":{"type":"boolean"},"capture":{"type":"boolean"},"attachments":{"type":"boolean"},"notices":{"type":"boolean"}},"required":["drawing","capture","attachments"],"additionalProperties":false}},"required":["enabled","resource_key","room_key","version","space","theme","ws_url","endpoints","features"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/comments/embed-ticket":{"post":{"security":[{}],"operationId":"createSpaceCommentsEmbedTicket","summary":"Mint a third-party comments embed ticket","description":"Mints a single-use, room-scoped Cast ticket for an anonymous visitor on an allowlisted embedding site. Both the room and the visitor's identity are server-derived.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":160}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","type":"string","minLength":1,"maxLength":2048},"identity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}\\p{Cf}]+$"},"namedByUser":{"type":"boolean"}},"required":["name","namedByUser"]},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","type":"string","minLength":1,"maxLength":2048},"identity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}\\p{Cf}]+$"},"namedByUser":{"type":"boolean"}},"required":["name","namedByUser"]},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","type":"string","minLength":1,"maxLength":2048},"identity":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\p{Cc}\\p{Cf}]+$"},"namedByUser":{"type":"boolean"}},"required":["name","namedByUser"]},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"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))$"},"cast":{"type":"object","properties":{"resource":{"type":"string"},"room":{"type":"string"}},"required":["resource","room"],"additionalProperties":false},"visitorToken":{"type":"string"},"visitorExpiresAt":{"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":["token","expiresAt","cast","visitorToken","visitorExpiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/connectors/catalog":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"getConnectorCatalog","summary":"Browse the connector catalog","description":"Lists every addable surface — curated presets, the public registry, and the team's own connectors — one row per surface, with `alreadyAdded` state. Filter by text, by surface kind, or by where the row came from.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"query","in":"query","required":false,"schema":{"description":"Free-text filter over title, description, and domain.","type":"string","minLength":1,"maxLength":200}},{"name":"surface","in":"query","required":false,"schema":{"description":"Show only rows adding this surface.","type":"string","enum":["openapi","graphql","mcp"]}},{"name":"kind","in":"query","required":false,"schema":{"description":"Show only rows from this source.","type":"string","enum":["preset","registry","team"]}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable id for this row. Pass it to registration as `presetId` for a one-click add."},"kind":{"type":"string","enum":["preset","registry","team"],"description":"Where a catalog row came from: a curated preset, the public registry, or this team's own connectors."},"surface":{"type":"string","enum":["openapi","graphql","mcp"],"description":"Which surface this row adds. The one facet the picker offers."},"title":{"type":"string","description":"Service name plus surface, e.g. \"Stripe MCP\"."},"description":{"description":"One line on what the service does.","type":["string","null"]},"domain":{"description":"Provider domain, e.g. `stripe.com`. Null for rows with no public domain.","type":["string","null"]},"logoUrl":{"description":"Spacefast-proxied logo path. Never a third-party URL — the browser must not call the registry directly.","type":["string","null"]},"presetId":{"description":"Curated preset backing this row, when one does.","type":["string","null"]},"registryId":{"description":"Registry entry backing this row, when one does.","type":["string","null"]},"sourceUrl":{"description":"Machine endpoint or spec URL, when supplied by the catalog.","type":["string","null"]},"endpointInputRequired":{"description":"This surface requires a provider-specific endpoint before registration.","type":"boolean"},"family":{"description":"Grouping key for services that ship many slices, e.g. Google or Microsoft Graph.","type":["string","null"]},"featured":{"type":"boolean","description":"Whether to surface this row before the long tail."},"authHint":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"],"additionalProperties":false}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."},"description":"Authentication the row is expected to need, so the connect form is right on the first render."},"credentialGuidance":{"anyOf":[{"type":"object","properties":{"label":{"description":"The provider’s display label for this credential.","type":["string","null"]},"mintUrl":{"description":"Page on the provider where the credential is created.","type":["string","null"]},"docsUrl":{"description":"Provider documentation for this credential.","type":["string","null"]},"notes":{"description":"Setup notes: prerequisites, plan requirements, scopes to tick.","type":["string","null"]},"steps":{"type":"array","items":{"type":"string"},"description":"Ordered steps to get the credential, when the provider spells them out."}},"required":["label","mintUrl","docsUrl","notes","steps"],"additionalProperties":false,"description":"Provider-supplied help for one credential, shown next to the field asking for it."},{"type":"null"}],"description":"Per-domain credential help, when the registry has any."},"alreadyAdded":{"type":"boolean","description":"Whether this team already registered this surface."},"connectorSlug":{"description":"The team connector this row resolves to when `alreadyAdded`; null otherwise.","type":["string","null"]}},"required":["id","kind","surface","title","description","domain","logoUrl","presetId","registryId","family","featured","authHint","credentialGuidance","alreadyAdded","connectorSlug"],"additionalProperties":false,"description":"One addable surface in the merged catalog: curated presets, the public registry, and the team's own connectors."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/catalog/logo/{domain}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getConnectorCatalogLogo","summary":"Get a connector's logo","description":"Serves a provider logo through Spacefast so the browser never requests it from the registry directly. Answers an image or 404; nothing about a team is readable here, so it needs no credential and caches for a day.","responses":{"200":{"description":"The provider logo, as an image."},"404":{"description":"No logo for that domain."}},"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Provider domain the logo belongs to, e.g. `stripe.com`."}}],"tags":["Connectors"]}},"/v1/connectors/catalog/{domain}/guidance":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"getConnectorCredentialGuidance","summary":"Get credential guidance for a provider","description":"What the provider calls its key, where to mint it, and any setup notes — rendered inline next to the field asking for it. Served from the registry cache; empty when the registry knows nothing.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Provider domain the logo belongs to, e.g. `stripe.com`."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Per-provider credential guidance for the connect modal; empty when the registry knows none.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"label":{"description":"The provider’s display label for this credential.","type":["string","null"]},"mintUrl":{"description":"Page on the provider where the credential is created.","type":["string","null"]},"docsUrl":{"description":"Provider documentation for this credential.","type":["string","null"]},"notes":{"description":"Setup notes: prerequisites, plan requirements, scopes to tick.","type":["string","null"]},"steps":{"type":"array","items":{"type":"string"},"description":"Ordered steps to get the credential, when the provider spells them out."}},"required":["label","mintUrl","docsUrl","notes","steps"],"additionalProperties":false,"description":"Provider-supplied help for one credential, shown next to the field asking for it."}}},"required":["data"],"additionalProperties":false,"description":"Per-provider credential guidance for the connect modal; empty when the registry knows none."}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnectors","summary":"List a team's connectors","description":"Returns the connectors this team registered, each carrying the connections the calling credential may actually use — not every connection that exists on it.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"query","in":"query","required":false,"schema":{"description":"Free-text filter over slug, title, and description.","type":"string","minLength":1,"maxLength":200}},{"name":"source","in":"query","required":false,"schema":{"description":"Show only connectors of this source kind.","type":"string","enum":["openapi","graphql","mcp"]}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Stable, team-unique connector slug. Also the namespace tools hang off."},"title":{"type":"string","description":"Display name, seeded from the source spec."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":["string","null"]},"source":{"type":"string","enum":["openapi","graphql","mcp"],"description":"The kind of tool source a connector reads: an OpenAPI spec, a GraphQL endpoint, or a remote MCP server."},"catalogSource":{"description":"Stored spec or endpoint for execution catalog discovery. No credentials.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"spec":{"type":"string"},"baseUrl":{"type":"string"}},"required":["kind","spec"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false}]},"sourceUrl":{"description":"Spec, endpoint, or MCP URL this connector was built from; null when it was registered from an inline spec.","type":["string","null"]},"firstParty":{"type":"boolean","description":"Built into Spacefast. First-party connectors cannot be edited or removed."},"presetId":{"description":"Curated preset this connector was created from, when it came from the catalog.","type":["string","null"]},"authMethods":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"],"additionalProperties":false}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."},"description":"Every way this connector can be authenticated."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools this connector exposes after the last spec sync."},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"description":"Connections the calling credential may use — not every connection that exists on this connector."},"specSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last time the source was fetched and tools rebuilt."},"createdAt":{"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))$"},"updatedAt":{"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":["slug","title","description","source","sourceUrl","firstParty","presetId","authMethods","toolCount","connections","specSyncedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A tool source registered for one team."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"registerConnector","summary":"Register a connector","description":"Fetches the source, parses it, dispatches to the plugin that owns it, and syncs the tool catalog — one call. Passing a `presetId` from the catalog resolves the source for you. GraphQL catalog registration preserves credential headers; an explicit API-key method on a custom GraphQL source uses Authorization: Bearer. An MCP endpoint is asked how it authenticates, so a server that wants OAuth gets an OAuth connector; `authMethods` overrides what it answers.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Team-unique slug. Also the namespace its tools hang off, so keep it short."},"title":{"type":"string","minLength":1,"maxLength":255,"description":"Display name. Defaults to whatever the source calls itself."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":"string","maxLength":1000},"presetId":{"description":"Catalog row supplying the source and authentication recipe. An explicit source overrides its endpoint and must use the same kind.","type":"string","minLength":1},"source":{"description":"Required unless `presetId` names a catalog row that carries it.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"specUrl":{"description":"URL of the OpenAPI document to fetch.","type":"string","format":"uri"},"spec":{"description":"Inline OpenAPI document, when there is no URL to fetch.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"baseUrl":{"description":"Override the server URL the spec declares.","type":"string","format":"uri"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string","format":"uri","description":"GraphQL endpoint to introspect."}},"required":["kind","endpoint"]},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string","format":"uri","description":"Remote MCP endpoint. stdio servers cannot be reached from a hosted product."}},"required":["kind","endpoint"]}]},"authMethods":{"description":"Omit to derive authentication from the source's own declared security schemes.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"]},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"]}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."}},"specOverrides":{"description":"RFC 6902 JSON Patch operations applied to the fetched spec before tools are built.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["slug","title"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Team-unique slug. Also the namespace its tools hang off, so keep it short."},"title":{"type":"string","minLength":1,"maxLength":255,"description":"Display name. Defaults to whatever the source calls itself."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":"string","maxLength":1000},"presetId":{"description":"Catalog row supplying the source and authentication recipe. An explicit source overrides its endpoint and must use the same kind.","type":"string","minLength":1},"source":{"description":"Required unless `presetId` names a catalog row that carries it.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"specUrl":{"description":"URL of the OpenAPI document to fetch.","type":"string","format":"uri"},"spec":{"description":"Inline OpenAPI document, when there is no URL to fetch.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"baseUrl":{"description":"Override the server URL the spec declares.","type":"string","format":"uri"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string","format":"uri","description":"GraphQL endpoint to introspect."}},"required":["kind","endpoint"]},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string","format":"uri","description":"Remote MCP endpoint. stdio servers cannot be reached from a hosted product."}},"required":["kind","endpoint"]}]},"authMethods":{"description":"Omit to derive authentication from the source's own declared security schemes.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"]},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"]}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."}},"specOverrides":{"description":"RFC 6902 JSON Patch operations applied to the fetched spec before tools are built.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["slug","title"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$","description":"Team-unique slug. Also the namespace its tools hang off, so keep it short."},"title":{"type":"string","minLength":1,"maxLength":255,"description":"Display name. Defaults to whatever the source calls itself."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":"string","maxLength":1000},"presetId":{"description":"Catalog row supplying the source and authentication recipe. An explicit source overrides its endpoint and must use the same kind.","type":"string","minLength":1},"source":{"description":"Required unless `presetId` names a catalog row that carries it.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"specUrl":{"description":"URL of the OpenAPI document to fetch.","type":"string","format":"uri"},"spec":{"description":"Inline OpenAPI document, when there is no URL to fetch.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"baseUrl":{"description":"Override the server URL the spec declares.","type":"string","format":"uri"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string","format":"uri","description":"GraphQL endpoint to introspect."}},"required":["kind","endpoint"]},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string","format":"uri","description":"Remote MCP endpoint. stdio servers cannot be reached from a hosted product."}},"required":["kind","endpoint"]}]},"authMethods":{"description":"Omit to derive authentication from the source's own declared security schemes.","type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"]},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"]},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"]}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."}},"specOverrides":{"description":"RFC 6902 JSON Patch operations applied to the fetched spec before tools are built.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["slug","title"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"slug":{"type":"string","description":"Stable, team-unique connector slug. Also the namespace tools hang off."},"title":{"type":"string","description":"Display name, seeded from the source spec."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":["string","null"]},"source":{"type":"string","enum":["openapi","graphql","mcp"],"description":"The kind of tool source a connector reads: an OpenAPI spec, a GraphQL endpoint, or a remote MCP server."},"catalogSource":{"description":"Stored spec or endpoint for execution catalog discovery. No credentials.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"spec":{"type":"string"},"baseUrl":{"type":"string"}},"required":["kind","spec"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false}]},"sourceUrl":{"description":"Spec, endpoint, or MCP URL this connector was built from; null when it was registered from an inline spec.","type":["string","null"]},"firstParty":{"type":"boolean","description":"Built into Spacefast. First-party connectors cannot be edited or removed."},"presetId":{"description":"Curated preset this connector was created from, when it came from the catalog.","type":["string","null"]},"authMethods":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"],"additionalProperties":false}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."},"description":"Every way this connector can be authenticated."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools this connector exposes after the last spec sync."},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"description":"Connections the calling credential may use — not every connection that exists on this connector."},"specSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last time the source was fetched and tools rebuilt."},"createdAt":{"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))$"},"updatedAt":{"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":["slug","title","description","source","sourceUrl","firstParty","presetId","authMethods","toolCount","connections","specSyncedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A tool source registered for one team."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/detect":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"detectConnectorSource","summary":"Detect what is behind a URL","description":"Runs every plugin's detector against a pasted URL and returns the candidates it recognized, most confident first. The URL to register may not be the URL that was pasted.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Any URL a service published. Every plugin's detector gets a look at it."}},"required":["url"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Any URL a service published. Every plugin's detector gets a look at it."}},"required":["url"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri","description":"Any URL a service published. Every plugin's detector gets a look at it."}},"required":["url"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi","graphql","mcp"],"description":"Source kind this candidate would register as."},"confidence":{"type":"string","enum":["high","medium","low"],"description":"How sure the detector is. Ranked highest first."},"endpoint":{"type":"string","format":"uri","description":"The URL to register, which may not be the URL that was pasted."},"title":{"type":"string","description":"Name the source calls itself."},"slug":{"type":"string","description":"Suggested slug, already checked against the team's connectors."},"presetId":{"description":"Catalog row this resolved to, when the paste matched a known service.","type":["string","null"]}},"required":["kind","confidence","endpoint","title","slug","presetId"],"additionalProperties":false,"description":"One candidate connector behind a pasted URL."}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/{connectorRef}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"getConnector","summary":"Read one connector","description":"Returns one connector with the connections the calling credential may use and the tools it currently exposes.","parameters":[{"name":"connectorRef","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connector slug."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"slug":{"type":"string","description":"Stable, team-unique connector slug. Also the namespace tools hang off."},"title":{"type":"string","description":"Display name, seeded from the source spec."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":["string","null"]},"source":{"type":"string","enum":["openapi","graphql","mcp"],"description":"The kind of tool source a connector reads: an OpenAPI spec, a GraphQL endpoint, or a remote MCP server."},"catalogSource":{"description":"Stored spec or endpoint for execution catalog discovery. No credentials.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"spec":{"type":"string"},"baseUrl":{"type":"string"}},"required":["kind","spec"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false}]},"sourceUrl":{"description":"Spec, endpoint, or MCP URL this connector was built from; null when it was registered from an inline spec.","type":["string","null"]},"firstParty":{"type":"boolean","description":"Built into Spacefast. First-party connectors cannot be edited or removed."},"presetId":{"description":"Curated preset this connector was created from, when it came from the catalog.","type":["string","null"]},"authMethods":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"],"additionalProperties":false}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."},"description":"Every way this connector can be authenticated."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools this connector exposes after the last spec sync."},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"description":"Connections the calling credential may use — not every connection that exists on this connector."},"specSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last time the source was fetched and tools rebuilt."},"createdAt":{"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))$"},"updatedAt":{"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":["slug","title","description","source","sourceUrl","firstParty","presetId","authMethods","toolCount","connections","specSyncedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A tool source registered for one team."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"updateConnector","summary":"Update a connector","description":"Renames a connector, replaces its agent-visible description, or re-fetches its source and rebuilds the tool catalog. Connections and policy rules survive a refresh. Refreshing an MCP connector also re-detects how the server authenticates, so one stuck on “No authentication” picks up the OAuth it now advertises; authentication already declared is left alone.","parameters":[{"name":"connectorRef","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connector slug."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"Replacement display name.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"refreshSpec":{"description":"Re-fetch the source and rebuild the tool catalog. Connections and policy rules survive it.","type":"boolean"},"specOverrides":{"description":"Replacement RFC 6902 JSON Patch operations. Applied on the next spec build.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"Replacement display name.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"refreshSpec":{"description":"Re-fetch the source and rebuild the tool catalog. Connections and policy rules survive it.","type":"boolean"},"specOverrides":{"description":"Replacement RFC 6902 JSON Patch operations. Applied on the next spec build.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"description":"Replacement display name.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"refreshSpec":{"description":"Re-fetch the source and rebuild the tool catalog. Connections and policy rules survive it.","type":"boolean"},"specOverrides":{"description":"Replacement RFC 6902 JSON Patch operations. Applied on the next spec build.","maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"slug":{"type":"string","description":"Stable, team-unique connector slug. Also the namespace tools hang off."},"title":{"type":"string","description":"Display name, seeded from the source spec."},"description":{"description":"What this connector reaches, in one line. Agent-visible.","type":["string","null"]},"source":{"type":"string","enum":["openapi","graphql","mcp"],"description":"The kind of tool source a connector reads: an OpenAPI spec, a GraphQL endpoint, or a remote MCP server."},"catalogSource":{"description":"Stored spec or endpoint for execution catalog discovery. No credentials.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"openapi"},"spec":{"type":"string"},"baseUrl":{"type":"string"}},"required":["kind","spec"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"graphql"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mcp"},"endpoint":{"type":"string"}},"required":["kind","endpoint"],"additionalProperties":false}]},"sourceUrl":{"description":"Spec, endpoint, or MCP URL this connector was built from; null when it was registered from an inline spec.","type":["string","null"]},"firstParty":{"type":"boolean","description":"Built into Spacefast. First-party connectors cannot be edited or removed."},"presetId":{"description":"Curated preset this connector was created from, when it came from the catalog.","type":["string","null"]},"authMethods":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"oauth2"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form, in the provider's own words."},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes requested at authorization unless the caller narrows them."},"clientIdMetadataDocument":{"description":"Whether the provider supports public clients identified by a metadata-document URL.","type":"boolean"},"dynamicRegistration":{"type":"boolean","description":"Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created."}},"required":["kind","slug","label","scopes","dynamicRegistration"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"none"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."}},"required":["kind","slug","label"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"first_party"},"slug":{"type":"string","description":"Names this method when a connector offers more than one."},"label":{"type":"string","description":"What to call it in a connect form."},"provider":{"type":"string","description":"Existing Spacefast credential this connector borrows, e.g. the GitHub App installation. Nothing to enter."}},"required":["kind","slug","label","provider"],"additionalProperties":false}],"description":"One way to authenticate a connector. A connector may offer several, so a connect call names the one it means."},"description":"Every way this connector can be authenticated."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools this connector exposes after the last spec sync."},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"description":"Connections the calling credential may use — not every connection that exists on this connector."},"specSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last time the source was fetched and tools rebuilt."},"createdAt":{"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))$"},"updatedAt":{"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":["slug","title","description","source","sourceUrl","firstParty","presetId","authMethods","toolCount","connections","specSyncedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A tool source registered for one team."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"deleteConnector","summary":"Remove a connector","description":"Disconnects every account connected to this connector, then removes the connector and its tools. First-party connectors cannot be removed.","parameters":[{"name":"connectorRef","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connector slug."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null","description":"Removing a connector returns no resource body."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/{connectorRef}/tools":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnectorTools","summary":"List a connector's tools","description":"Returns every tool the connector exposes with its resolved policy effect and the rule that decided it, so a caller knows the answer before it calls.","parameters":[{"name":"connectorRef","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connector slug."}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"query","in":"query","required":false,"schema":{"description":"Free-text filter over tool name and summary.","type":"string","minLength":1,"maxLength":200}},{"name":"effect","in":"query","required":false,"schema":{"description":"Show only tools that resolve to this effect.","type":"string","enum":["approve","require_approval","block"]}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"`/` — the one address grammar. Pass this straight to a connector run."},"name":{"type":"string","description":"Tool name within its connector."},"summary":{"type":"string","description":"One line on what the tool does, from the source spec."},"safety":{"type":"string","enum":["read_only","write","destructive"],"description":"What the tool does to the far side, read from the source spec. Not configurable."},"effect":{"type":"string","enum":["approve","require_approval","block"],"description":"What actually happens when an agent calls this, after policy resolution."},"decidedBy":{"anyOf":[{"type":"object","properties":{"ruleId":{"type":"string","description":"Policy rule that decided it."},"pattern":{"type":"string","description":"The pattern that matched."},"owner":{"type":"string","enum":["team","personal"],"description":"Whose rule it is. Team rules are a floor members cannot loosen."}},"required":["ruleId","pattern","owner"],"additionalProperties":false,"description":"The rule that answered for an address. One shape wherever an effect is explained."},{"type":"null"}],"description":"The rule behind `effect`; null when nothing matched and the spec's own default applied."},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema for the tool's arguments."}},"required":["address","name","summary","safety","effect","decidedBy","inputSchema"],"additionalProperties":false,"description":"One callable tool, already resolved against policy so a caller knows the answer before it calls."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnections","summary":"List connections","description":"Returns the connections the calling credential may use — team connections plus your own personal ones. A revoked connection is a tombstone and stays out unless you ask for it.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"owner","in":"query","required":false,"schema":{"default":"any","description":"Whose connections to list. `any` is everything the calling credential may use.","anyOf":[{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},{"type":"string","const":"any"}]}},{"name":"connector","in":"query","required":false,"schema":{"description":"Show only connections of this connector.","type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"description":"Show only connections in this state.","type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"]}},{"name":"includeRevoked","in":"query","required":false,"schema":{"default":false,"description":"Include disconnected connections.","type":"boolean"}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"createConnection","summary":"Connect a connector","description":"One call to connect anything. The answer is `connected`, `authorization_required` with a URL to open, or `input_required` with the fields to collect — branch on `status`; there is no fourth. Credentials are write-only and never come back.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connector":{"type":"string","minLength":1,"description":"Connector slug to connect."},"owner":{"type":"string","enum":["team","personal"],"description":"Share it with the team, or keep it yours within this team."},"displayName":{"description":"What to call it. Defaults to the connector's title.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Agent-visible note on what this connection is for.","type":"string","maxLength":1000},"authMethod":{"description":"Which of the connector's auth methods to use. Required only when more than one could apply.","type":"string","minLength":1},"credential":{"description":"Omit it and the server tells you what it needs.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]},"returnPath":{"description":"Dashboard path to land on after authorization. Same-origin only; absolute URLs are rejected.","type":"string","maxLength":512,"pattern":"^\\/.*"}},"required":["connector","owner"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connector":{"type":"string","minLength":1,"description":"Connector slug to connect."},"owner":{"type":"string","enum":["team","personal"],"description":"Share it with the team, or keep it yours within this team."},"displayName":{"description":"What to call it. Defaults to the connector's title.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Agent-visible note on what this connection is for.","type":"string","maxLength":1000},"authMethod":{"description":"Which of the connector's auth methods to use. Required only when more than one could apply.","type":"string","minLength":1},"credential":{"description":"Omit it and the server tells you what it needs.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]},"returnPath":{"description":"Dashboard path to land on after authorization. Same-origin only; absolute URLs are rejected.","type":"string","maxLength":512,"pattern":"^\\/.*"}},"required":["connector","owner"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connector":{"type":"string","minLength":1,"description":"Connector slug to connect."},"owner":{"type":"string","enum":["team","personal"],"description":"Share it with the team, or keep it yours within this team."},"displayName":{"description":"What to call it. Defaults to the connector's title.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Agent-visible note on what this connection is for.","type":"string","maxLength":1000},"authMethod":{"description":"Which of the connector's auth methods to use. Required only when more than one could apply.","type":"string","minLength":1},"credential":{"description":"Omit it and the server tells you what it needs.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]},"returnPath":{"description":"Dashboard path to land on after authorization. Same-origin only; absolute URLs are rejected.","type":"string","maxLength":512,"pattern":"^\\/.*"}},"required":["connector","owner"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"connected","description":"Done. The connection is usable now."},"connection":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"required":["status","connection"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"authorization_required","description":"Send the user to `authorizeUrl`; the callback completes it."},"connection":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"Already created, in `pending_authorization`, so it has an id to watch."},"authorizeUrl":{"type":"string","format":"uri","description":"Provider authorization page. Open it in a window you reserved beforehand."},"expiresAt":{"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))$","description":"After this the authorization attempt is dead; start over."}},"required":["status","connection","authorizeUrl","expiresAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"input_required","description":"Nothing was created. Collect these values and call again."},"connector":{"type":"string","description":"Connector slug this applies to."},"authMethod":{"type":"string","description":"Auth method the fields belong to. Send it back on the next call."},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Field key to send back in `credential.values`."},"required":{"description":"Whether this field must be filled before connecting. Defaults to true.","type":"boolean"},"label":{"type":"string","description":"What to show above the input."},"secret":{"type":"boolean","description":"Whether the value is a secret: mask it in UI, never log it, never echo it back."},"guidance":{"anyOf":[{"type":"object","properties":{"label":{"description":"The provider’s display label for this credential.","type":["string","null"]},"mintUrl":{"description":"Page on the provider where the credential is created.","type":["string","null"]},"docsUrl":{"description":"Provider documentation for this credential.","type":["string","null"]},"notes":{"description":"Setup notes: prerequisites, plan requirements, scopes to tick.","type":["string","null"]},"steps":{"type":"array","items":{"type":"string"},"description":"Ordered steps to get the credential, when the provider spells them out."}},"required":["label","mintUrl","docsUrl","notes","steps"],"additionalProperties":false,"description":"Provider-supplied help for one credential, shown next to the field asking for it."},{"type":"null"}],"description":"Provider help for this field, when the registry has any."}},"required":["name","label","secret","guidance"],"additionalProperties":false,"description":"One value a connector needs before it can connect."},"description":"What to ask for, in the order to ask."}},"required":["status","connector","authMethod","fields"],"additionalProperties":false}],"description":"The three ways connecting can end. Branch on `status`; there is no fourth."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/complete":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"completeConnection","summary":"Complete an authorization","description":"Finishes an OAuth connect from the dashboard callback. The `state` addresses the attempt on its own. Invalid or consumed states are rejected; start a new authorization attempt to reconnect.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"state":{"type":"string","minLength":1,"description":"Opaque state from the authorization redirect. Addresses the attempt on its own."},"code":{"type":"string","minLength":1,"description":"Authorization code from the provider."}},"required":["state","code"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"state":{"type":"string","minLength":1,"description":"Opaque state from the authorization redirect. Addresses the attempt on its own."},"code":{"type":"string","minLength":1,"description":"Authorization code from the provider."}},"required":["state","code"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"state":{"type":"string","minLength":1,"description":"Opaque state from the authorization redirect. Addresses the attempt on its own."},"code":{"type":"string","minLength":1,"description":"Authorization code from the provider."}},"required":["state","code"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"getConnection","summary":"Read one connection","description":"Returns one connection's derived state, identity, and tool count. A connection the calling credential may not use is indistinguishable from one that does not exist.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"updateConnection","summary":"Update a connection","description":"Renames a connection, updates its note, or grants team connections permission to serve sites. Credentials are immutable: to rotate one, reconnect.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"serving":{"type":"boolean"},"displayName":{"description":"Replacement label.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"serving":{"type":"boolean"},"displayName":{"description":"Replacement label.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"serving":{"type":"boolean"},"displayName":{"description":"Replacement label.","type":"string","minLength":1,"maxLength":255},"description":{"description":"Replacement agent-visible description.","anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}/disconnect":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"disconnectConnection","summary":"Disconnect a connection","description":"Purges the stored credential, tombstones the connection, and audits it. Idempotent: disconnecting an already-disconnected connection is a no-op.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}/refresh":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"refreshConnection","summary":"Re-sync a connection's tools","description":"Re-resolves the tool catalog behind a connection. Token refresh happens on its own; this is about the tools.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}/reconnect":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"reconnectConnection","summary":"Reconnect an account","description":"Re-authorizes a connection that already exists. Same three-arm answer as connecting — `connected`, `authorization_required`, or `input_required` — but the connection keeps its id, label, policies, and Space bindings, and the callback route finishes it. A disconnected connection cannot be reconnected.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credential":{"description":"The replacement credential. Omit it and the server tells you what it needs — for OAuth that is usually nothing.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credential":{"description":"The replacement credential. Omit it and the server tells you what it needs — for OAuth that is usually nothing.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credential":{"description":"The replacement credential. Omit it and the server tells you what it needs — for OAuth that is usually nothing.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"api_key"},"value":{"type":"string","minLength":1,"description":"The key. Write-only: sealed on arrival, never returned by any endpoint."}},"required":["kind","value"]},{"type":"object","properties":{"kind":{"type":"string","const":"fields"},"values":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Values keyed by the field names the connector asked for. Write-only, same as a key."}},"required":["kind","values"]}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"connected","description":"Done. The connection is usable now."},"connection":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."}},"required":["status","connection"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"authorization_required","description":"Send the user to `authorizeUrl`; the callback completes it."},"connection":{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"Already created, in `pending_authorization`, so it has an id to watch."},"authorizeUrl":{"type":"string","format":"uri","description":"Provider authorization page. Open it in a window you reserved beforehand."},"expiresAt":{"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))$","description":"After this the authorization attempt is dead; start over."}},"required":["status","connection","authorizeUrl","expiresAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"input_required","description":"Nothing was created. Collect these values and call again."},"connector":{"type":"string","description":"Connector slug this applies to."},"authMethod":{"type":"string","description":"Auth method the fields belong to. Send it back on the next call."},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Field key to send back in `credential.values`."},"required":{"description":"Whether this field must be filled before connecting. Defaults to true.","type":"boolean"},"label":{"type":"string","description":"What to show above the input."},"secret":{"type":"boolean","description":"Whether the value is a secret: mask it in UI, never log it, never echo it back."},"guidance":{"anyOf":[{"type":"object","properties":{"label":{"description":"The provider’s display label for this credential.","type":["string","null"]},"mintUrl":{"description":"Page on the provider where the credential is created.","type":["string","null"]},"docsUrl":{"description":"Provider documentation for this credential.","type":["string","null"]},"notes":{"description":"Setup notes: prerequisites, plan requirements, scopes to tick.","type":["string","null"]},"steps":{"type":"array","items":{"type":"string"},"description":"Ordered steps to get the credential, when the provider spells them out."}},"required":["label","mintUrl","docsUrl","notes","steps"],"additionalProperties":false,"description":"Provider-supplied help for one credential, shown next to the field asking for it."},{"type":"null"}],"description":"Provider help for this field, when the registry has any."}},"required":["name","label","secret","guidance"],"additionalProperties":false,"description":"One value a connector needs before it can connect."},"description":"What to ask for, in the order to ask."}},"required":["status","connector","authMethod","fields"],"additionalProperties":false}],"description":"The three ways connecting can end. Branch on `status`; there is no fourth."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}/health":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"checkConnectionHealth","summary":"Probe a connection","description":"Runs the connector's declared health check against the stored credential and reports what came back. It only reports: an expired token refreshes on its own.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"connectionId":{"type":"string"},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"State after this probe."},"reachable":{"type":"boolean","description":"Whether the provider answered."},"latencyMs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Round trip of the probe; null when it never got an answer."},"detail":{"description":"What went wrong, when something did.","type":["string","null"]},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable right now."},"checkedAt":{"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":["connectionId","status","reachable","latencyMs","detail","toolCount","checkedAt"],"additionalProperties":false,"description":"A live probe of one connection. Token refresh happens automatically; this only reports."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/connections/{connectionId}/tools":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnectionTools","summary":"List one connection's tools","description":"Returns the tools reachable through one connection, each with the effect policy resolves it to and the rule behind that effect.","parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Connection id (`cxn_`)."}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"query","in":"query","required":false,"schema":{"description":"Free-text filter over tool name and summary.","type":"string","minLength":1,"maxLength":200}},{"name":"effect","in":"query","required":false,"schema":{"description":"Show only tools that resolve to this effect.","type":"string","enum":["approve","require_approval","block"]}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"`/` — the one address grammar. Pass this straight to a connector run."},"name":{"type":"string","description":"Tool name within its connector."},"summary":{"type":"string","description":"One line on what the tool does, from the source spec."},"safety":{"type":"string","enum":["read_only","write","destructive"],"description":"What the tool does to the far side, read from the source spec. Not configurable."},"effect":{"type":"string","enum":["approve","require_approval","block"],"description":"What actually happens when an agent calls this, after policy resolution."},"decidedBy":{"anyOf":[{"type":"object","properties":{"ruleId":{"type":"string","description":"Policy rule that decided it."},"pattern":{"type":"string","description":"The pattern that matched."},"owner":{"type":"string","enum":["team","personal"],"description":"Whose rule it is. Team rules are a floor members cannot loosen."}},"required":["ruleId","pattern","owner"],"additionalProperties":false,"description":"The rule that answered for an address. One shape wherever an effect is explained."},{"type":"null"}],"description":"The rule behind `effect`; null when nothing matched and the spec's own default applied."},"inputSchema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"JSON Schema for the tool's arguments."}},"required":["address","name","summary","safety","effect","decidedBy","inputSchema"],"additionalProperties":false,"description":"One callable tool, already resolved against policy so a caller knows the answer before it calls."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/policies":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnectorPolicies","summary":"List policy rules","description":"Returns the ordered address-pattern rules that decide what an agent may call. Team rules are a floor a member cannot loosen.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Policy rule id. Opaque — minted by the policy engine, not a Spacefast resource prefix."},"pattern":{"type":"string","description":"`*`, `/*`, `/*`, or `/`. First match in order wins."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules are a floor: a personal rule may tighten one, never loosen it."},"position":{"type":"string","description":"Fractional index the engine assigned from the pattern's specificity. Rules evaluate in this order."},"createdAt":{"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","pattern","action","owner","position","createdAt"],"additionalProperties":false,"description":"One ordered address-pattern rule. Most restrictive across owners wins."}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"createConnectorPolicy","summary":"Create a policy rule","description":"Adds an ordered rule over `*`, `/*`, `/*`, or `/`. Its position comes from the pattern's specificity, so the more specific rule always wins.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":512,"description":"`*`, `/*`, `/*`, or `/`."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules apply to everyone and are a floor personal rules cannot loosen."}},"required":["pattern","action","owner"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":512,"description":"`*`, `/*`, `/*`, or `/`."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules apply to everyone and are a floor personal rules cannot loosen."}},"required":["pattern","action","owner"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":512,"description":"`*`, `/*`, `/*`, or `/`."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules apply to everyone and are a floor personal rules cannot loosen."}},"required":["pattern","action","owner"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Policy rule id. Opaque — minted by the policy engine, not a Spacefast resource prefix."},"pattern":{"type":"string","description":"`*`, `/*`, `/*`, or `/`. First match in order wins."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules are a floor: a personal rule may tighten one, never loosen it."},"position":{"type":"string","description":"Fractional index the engine assigned from the pattern's specificity. Rules evaluate in this order."},"createdAt":{"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","pattern","action","owner","position","createdAt"],"additionalProperties":false,"description":"One ordered address-pattern rule. Most restrictive across owners wins."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/policies/{policyRuleId}":{"patch":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"updateConnectorPolicy","summary":"Change a policy rule's action","description":"Replaces what a rule does. A rule's pattern and owner are fixed — delete it and add the one you meant.","parameters":[{"name":"policyRuleId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Policy rule id."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","require_approval","block"],"description":"Replacement action. A rule's pattern and owner are fixed — delete and re-add."}},"required":["action"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","require_approval","block"],"description":"Replacement action. A rule's pattern and owner are fixed — delete and re-add."}},"required":["action"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","require_approval","block"],"description":"Replacement action. A rule's pattern and owner are fixed — delete and re-add."}},"required":["action"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Policy rule id. Opaque — minted by the policy engine, not a Spacefast resource prefix."},"pattern":{"type":"string","description":"`*`, `/*`, `/*`, or `/`. First match in order wins."},"action":{"type":"string","enum":["approve","require_approval","block"],"description":"What policy does with a call: run it, park it for a person, or refuse it."},"owner":{"type":"string","enum":["team","personal"],"description":"Team rules are a floor: a personal rule may tighten one, never loosen it."},"position":{"type":"string","description":"Fractional index the engine assigned from the pattern's specificity. Rules evaluate in this order."},"createdAt":{"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","pattern","action","owner","position","createdAt"],"additionalProperties":false,"description":"One ordered address-pattern rule. Most restrictive across owners wins."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"deleteConnectorPolicy","summary":"Delete a policy rule","description":"Removes one rule. Whatever it decided falls through to the next rule that matches, or to the spec's own default.","parameters":[{"name":"policyRuleId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Policy rule id."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null","description":"Removing a policy rule returns no resource body."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/policies/resolve":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"resolveConnectorPolicy","summary":"Explain what would happen","description":"Answers \"what happens if I call this, and why\" for one tool address, without making the call.","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512,"description":"`/` to resolve."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"address":{"type":"string","description":"The address that was resolved."},"effect":{"type":"string","enum":["approve","require_approval","block"],"description":"What would happen if you called it right now."},"decidedBy":{"anyOf":[{"type":"object","properties":{"ruleId":{"type":"string","description":"Policy rule that decided it."},"pattern":{"type":"string","description":"The pattern that matched."},"owner":{"type":"string","enum":["team","personal"],"description":"Whose rule it is. Team rules are a floor members cannot loosen."}},"required":["ruleId","pattern","owner"],"additionalProperties":false,"description":"The rule that answered for an address. One shape wherever an effect is explained."},{"type":"null"}],"description":"The rule that decided it; null when the spec default applied."},"explanation":{"type":"string","description":"Why, in a sentence you can put in front of a person."}},"required":["address","effect","decidedBy","explanation"],"additionalProperties":false,"description":"\"What happens if I call this, and why\" — the answer without making the call."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/runs":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:execute"]}],"operationId":"createConnectorRun","summary":"Run a tool or a program","description":"The one execution primitive: a single tool call and a code program are the same operation, with one id space, one status machine, and one resume. A run that fails answers 200 with the failure embedded — the request succeeded, the run did not. Retrying with the same `idempotencyKey` returns the original run and answers 200 instead of 201.","parameters":[{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool"},"address":{"type":"string","minLength":1,"maxLength":512,"description":"`/`, straight off a tool listing."},"args":{"default":{},"description":"Arguments, validated against the tool's own input schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","address"]},{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":200000,"description":"A program run in the sandbox. It may call any tool the calling credential is granted."}},"required":["kind","code"]}],"description":"One call, or a program that makes many. Same endpoint either way."},"waitMs":{"description":"How long to hold the request waiting for a terminal status before answering `running`.","type":"integer","minimum":0,"maximum":120000},"idempotencyKey":{"description":"Retry with the same key to get the original run back (200, not 201) instead of running it twice.","type":"string","minLength":1,"maxLength":320},"unattendedApprovals":{"default":"park","description":"What to do when a call needs approval and nobody is watching: park it for a person, or fail fast.","type":"string","enum":["park","deny"]}},"required":["input"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool"},"address":{"type":"string","minLength":1,"maxLength":512,"description":"`/`, straight off a tool listing."},"args":{"default":{},"description":"Arguments, validated against the tool's own input schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","address"]},{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":200000,"description":"A program run in the sandbox. It may call any tool the calling credential is granted."}},"required":["kind","code"]}],"description":"One call, or a program that makes many. Same endpoint either way."},"waitMs":{"description":"How long to hold the request waiting for a terminal status before answering `running`.","type":"integer","minimum":0,"maximum":120000},"idempotencyKey":{"description":"Retry with the same key to get the original run back (200, not 201) instead of running it twice.","type":"string","minLength":1,"maxLength":320},"unattendedApprovals":{"default":"park","description":"What to do when a call needs approval and nobody is watching: park it for a person, or fail fast.","type":"string","enum":["park","deny"]}},"required":["input"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"tool"},"address":{"type":"string","minLength":1,"maxLength":512,"description":"`/`, straight off a tool listing."},"args":{"default":{},"description":"Arguments, validated against the tool's own input schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","address"]},{"type":"object","properties":{"kind":{"type":"string","const":"code"},"code":{"type":"string","minLength":1,"maxLength":200000,"description":"A program run in the sandbox. It may call any tool the calling credential is granted."}},"required":["kind","code"]}],"description":"One call, or a program that makes many. Same endpoint either way."},"waitMs":{"description":"How long to hold the request waiting for a terminal status before answering `running`.","type":"integer","minimum":0,"maximum":120000},"idempotencyKey":{"description":"Retry with the same key to get the original run back (200, not 201) instead of running it twice.","type":"string","minLength":1,"maxLength":320},"unattendedApprovals":{"default":"park","description":"What to do when a call needs approval and nobody is watching: park it for a person, or fail fast.","type":"string","enum":["park","deny"]}},"required":["input"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"running","description":"Still executing. Poll the run, or submit the next one with a longer `waitMs`."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"awaiting_approval","description":"Parked on a decision."},"approval":{"type":"object","properties":{"decisionId":{"description":"Grant-decision id (`gdc_`) backing this approval when the credential is grant-backed; null for session/API-key pauses (resume with the run id).","type":["string","null"]},"mode":{"type":"string","enum":["human","model"],"description":"Who may decide. Fixed when the run parked: `human` refuses machine resumes."},"address":{"type":"string","description":"Tool the run is waiting to call."},"preview":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The arguments it would send, with secret-shaped values masked."},"reason":{"type":"string","enum":["policy_require_approval","annotation_requires_approval"],"description":"Why it parked: a policy rule, or the tool's own annotation."},"matchedPattern":{"description":"Policy pattern that parked it; null when the tool asked for itself.","type":["string","null"]},"approvalUrl":{"type":"string","format":"uri","description":"Dashboard page where a person approves or denies."},"expiresAt":{"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))$","description":"After this the run expires and cannot be resumed."}},"required":["decisionId","mode","address","preview","reason","matchedPattern","approvalUrl","expiresAt"],"additionalProperties":false,"description":"A run waiting on a decision. Durable — any replica can resume it."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","approval"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"succeeded"},"completedAt":{"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))$"},"result":{"description":"Whatever the tool or program returned."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","result"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"failed"},"completedAt":{"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))$"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false,"description":"Why it failed, as a problem document. The HTTP response is still 200: the request succeeded, the run did not."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","error"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"expired","description":"Parked too long. Submit it again; it cannot be resumed."},"completedAt":{"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":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt"],"additionalProperties":false}],"description":"One execution. A tool call and a code program are the same resource."}},"required":["data"],"additionalProperties":false}}}},"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"running","description":"Still executing. Poll the run, or submit the next one with a longer `waitMs`."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"awaiting_approval","description":"Parked on a decision."},"approval":{"type":"object","properties":{"decisionId":{"description":"Grant-decision id (`gdc_`) backing this approval when the credential is grant-backed; null for session/API-key pauses (resume with the run id).","type":["string","null"]},"mode":{"type":"string","enum":["human","model"],"description":"Who may decide. Fixed when the run parked: `human` refuses machine resumes."},"address":{"type":"string","description":"Tool the run is waiting to call."},"preview":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The arguments it would send, with secret-shaped values masked."},"reason":{"type":"string","enum":["policy_require_approval","annotation_requires_approval"],"description":"Why it parked: a policy rule, or the tool's own annotation."},"matchedPattern":{"description":"Policy pattern that parked it; null when the tool asked for itself.","type":["string","null"]},"approvalUrl":{"type":"string","format":"uri","description":"Dashboard page where a person approves or denies."},"expiresAt":{"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))$","description":"After this the run expires and cannot be resumed."}},"required":["decisionId","mode","address","preview","reason","matchedPattern","approvalUrl","expiresAt"],"additionalProperties":false,"description":"A run waiting on a decision. Durable — any replica can resume it."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","approval"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"succeeded"},"completedAt":{"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))$"},"result":{"description":"Whatever the tool or program returned."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","result"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"failed"},"completedAt":{"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))$"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false,"description":"Why it failed, as a problem document. The HTTP response is still 200: the request succeeded, the run did not."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","error"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"expired","description":"Parked too long. Submit it again; it cannot be resumed."},"completedAt":{"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":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt"],"additionalProperties":false}],"description":"One execution. A tool call and a code program are the same resource."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]},"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"listConnectorRuns","summary":"List runs","description":"Returns the team's runs, newest first. `status=awaiting_approval` is the approvals inbox query.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]}},{"name":"space","in":"query","required":false,"schema":{"description":"Filter by Space id.","type":"string","minLength":1}},{"name":"status","in":"query","required":false,"schema":{"description":"`awaiting_approval` is the approvals inbox query.","type":"string","enum":["running","awaiting_approval","succeeded","failed","expired"]}},{"name":"connection","in":"query","required":false,"schema":{"description":"Show only runs that touched this connection.","type":"string","minLength":1}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"running","description":"Still executing. Poll the run, or submit the next one with a longer `waitMs`."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"awaiting_approval","description":"Parked on a decision."},"approval":{"type":"object","properties":{"decisionId":{"description":"Grant-decision id (`gdc_`) backing this approval when the credential is grant-backed; null for session/API-key pauses (resume with the run id).","type":["string","null"]},"mode":{"type":"string","enum":["human","model"],"description":"Who may decide. Fixed when the run parked: `human` refuses machine resumes."},"address":{"type":"string","description":"Tool the run is waiting to call."},"preview":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The arguments it would send, with secret-shaped values masked."},"reason":{"type":"string","enum":["policy_require_approval","annotation_requires_approval"],"description":"Why it parked: a policy rule, or the tool's own annotation."},"matchedPattern":{"description":"Policy pattern that parked it; null when the tool asked for itself.","type":["string","null"]},"approvalUrl":{"type":"string","format":"uri","description":"Dashboard page where a person approves or denies."},"expiresAt":{"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))$","description":"After this the run expires and cannot be resumed."}},"required":["decisionId","mode","address","preview","reason","matchedPattern","approvalUrl","expiresAt"],"additionalProperties":false,"description":"A run waiting on a decision. Durable — any replica can resume it."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","approval"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"succeeded"},"completedAt":{"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))$"},"result":{"description":"Whatever the tool or program returned."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","result"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"failed"},"completedAt":{"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))$"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false,"description":"Why it failed, as a problem document. The HTTP response is still 200: the request succeeded, the run did not."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","error"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"expired","description":"Parked too long. Submit it again; it cannot be resumed."},"completedAt":{"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":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt"],"additionalProperties":false}],"description":"One execution. A tool call and a code program are the same resource."}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/runs/{runId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:read"]}],"operationId":"getConnectorRun","summary":"Read one run","description":"Returns one run: its result, the problem document that explains a failure, or the approval it is parked on.","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Run id (`cxr_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"running","description":"Still executing. Poll the run, or submit the next one with a longer `waitMs`."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"awaiting_approval","description":"Parked on a decision."},"approval":{"type":"object","properties":{"decisionId":{"description":"Grant-decision id (`gdc_`) backing this approval when the credential is grant-backed; null for session/API-key pauses (resume with the run id).","type":["string","null"]},"mode":{"type":"string","enum":["human","model"],"description":"Who may decide. Fixed when the run parked: `human` refuses machine resumes."},"address":{"type":"string","description":"Tool the run is waiting to call."},"preview":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The arguments it would send, with secret-shaped values masked."},"reason":{"type":"string","enum":["policy_require_approval","annotation_requires_approval"],"description":"Why it parked: a policy rule, or the tool's own annotation."},"matchedPattern":{"description":"Policy pattern that parked it; null when the tool asked for itself.","type":["string","null"]},"approvalUrl":{"type":"string","format":"uri","description":"Dashboard page where a person approves or denies."},"expiresAt":{"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))$","description":"After this the run expires and cannot be resumed."}},"required":["decisionId","mode","address","preview","reason","matchedPattern","approvalUrl","expiresAt"],"additionalProperties":false,"description":"A run waiting on a decision. Durable — any replica can resume it."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","approval"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"succeeded"},"completedAt":{"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))$"},"result":{"description":"Whatever the tool or program returned."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","result"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"failed"},"completedAt":{"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))$"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false,"description":"Why it failed, as a problem document. The HTTP response is still 200: the request succeeded, the run did not."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","error"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"expired","description":"Parked too long. Submit it again; it cannot be resumed."},"completedAt":{"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":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt"],"additionalProperties":false}],"description":"One execution. A tool call and a code program are the same resource."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/connectors/runs/{runId}/resume":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:execute"]}],"operationId":"resumeConnectorRun","summary":"Resume a parked run","description":"Decides a run that parked on an approval. A run parked in `human` mode refuses a machine decision; omit `action` to read the decision a person already recorded in the dashboard.","parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Run id (`cxr_`)."}},{"name":"team","in":"query","required":false,"schema":{"description":"Team id or slug to act for. Required only when the credential could act for more than one team.","type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"description":"Omit to leave it waiting for a person. A run parked in `human` mode refuses a machine decision.","type":"string","enum":["accept","decline","cancel"]},"content":{"description":"Values the paused call asked for, when the approval collected any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"description":"Omit to leave it waiting for a person. A run parked in `human` mode refuses a machine decision.","type":"string","enum":["accept","decline","cancel"]},"content":{"description":"Values the paused call asked for, when the approval collected any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"description":"Omit to leave it waiting for a person. A run parked in `human` mode refuses a machine decision.","type":"string","enum":["accept","decline","cancel"]},"content":{"description":"Values the paused call asked for, when the approval collected any.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"running","description":"Still executing. Poll the run, or submit the next one with a longer `waitMs`."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"awaiting_approval","description":"Parked on a decision."},"approval":{"type":"object","properties":{"decisionId":{"description":"Grant-decision id (`gdc_`) backing this approval when the credential is grant-backed; null for session/API-key pauses (resume with the run id).","type":["string","null"]},"mode":{"type":"string","enum":["human","model"],"description":"Who may decide. Fixed when the run parked: `human` refuses machine resumes."},"address":{"type":"string","description":"Tool the run is waiting to call."},"preview":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The arguments it would send, with secret-shaped values masked."},"reason":{"type":"string","enum":["policy_require_approval","annotation_requires_approval"],"description":"Why it parked: a policy rule, or the tool's own annotation."},"matchedPattern":{"description":"Policy pattern that parked it; null when the tool asked for itself.","type":["string","null"]},"approvalUrl":{"type":"string","format":"uri","description":"Dashboard page where a person approves or denies."},"expiresAt":{"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))$","description":"After this the run expires and cannot be resumed."}},"required":["decisionId","mode","address","preview","reason","matchedPattern","approvalUrl","expiresAt"],"additionalProperties":false,"description":"A run waiting on a decision. Durable — any replica can resume it."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","approval"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"succeeded"},"completedAt":{"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))$"},"result":{"description":"Whatever the tool or program returned."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","result"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"failed"},"completedAt":{"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))$"},"error":{"type":"object","properties":{"type":{"type":"string","description":"Problem type URI resolving to the error docs page. The server derives it mechanically from `code` against the docs origin."},"title":{"type":"string","description":"Short human-readable summary of the problem type. The server derives it mechanically from `code`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code of this response, repeated in the body."},"detail":{"type":"string","description":"Human-readable failure explanation for this occurrence."},"code":{"type":"string","description":"Stable snake_case error code naming the failed public contract."},"pointer":{"description":"RFC 6901 JSON Pointer into the failing request field, for example \"/files/37/path\", on validation failures.","type":"string"},"details":{"description":"Machine-readable context for the error code.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"suggestions":{"description":"Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.","type":"array","items":{"type":"string"}},"next":{"description":"Copy-pasteable commands or API requests an agent can run next.","type":"array","items":{"type":"string"}},"requestId":{"type":"string","description":"The request id to quote when contacting support."}},"required":["type","title","status","detail","code","requestId"],"additionalProperties":false,"description":"Why it failed, as a problem document. The HTTP response is still 200: the request succeeded, the run did not."}},"required":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt","error"],"additionalProperties":false},{"type":"object","properties":{"origin":{"type":"string","enum":["dashboard","cli","api","mcp","zero","function","system"]},"space":{"description":"Space id that initiated this run, if any.","type":["string","null"]},"handler":{"description":"Runtime handler that initiated this run, if any.","type":["string","null"]},"visitor":{"type":"boolean","description":"Whether a signed-in Space visitor initiated this run."},"id":{"type":"string","description":"Run id (`cxr_`)."},"input":{"type":"object","properties":{"kind":{"type":"string","enum":["tool","code"],"description":"`tool` is one call; `code` is a program that may make many. Same endpoint, same id space, same resume."},"address":{"description":"Tool address for a `tool` run; null for a `code` program.","type":["string","null"]},"digest":{"type":"string","description":"Content digest of the submitted input, so a retry can be recognized without replaying it."}},"required":["kind","address","digest"],"additionalProperties":false,"description":"What the run was asked to do, without echoing arguments that may carry customer data."},"usage":{"type":"object","properties":{"toolCalls":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tool calls made so far."},"egressBytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Bytes read from third-party APIs so far."},"durationMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wall-clock time spent executing so far."}},"required":["toolCalls","egressBytes","durationMs"],"additionalProperties":false,"description":"What this run has spent. Budgets are enforced against these numbers."},"createdAt":{"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))$"},"status":{"type":"string","const":"expired","description":"Parked too long. Submit it again; it cannot be resumed."},"completedAt":{"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":["origin","space","handler","visitor","id","input","usage","createdAt","status","completedAt"],"additionalProperties":false}],"description":"One execution. A tool call and a code program are the same resource."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Connectors"]}},"/v1/domains/search":{"post":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"x-spacefast-read-only":true,"operationId":"searchDomains","summary":"Search domain names with the operator in a conversation","description":"Find domain names with the dashboard's search workflow. A single keyword returns exact domain matches and domain hacks. A naming brief generates suggestions. Each search checks availability and Jev scores. The workflow replaces unavailable generated names. Refine the search with messages, likes, dislikes and selections. Carry the returned session unchanged into the next call. Use stable suggestion IDs for feedback. Display prices include the same fees as the dashboard. If complete is false, inspect problems. To resume, send the returned session without a new message. Confirm availability again before registration.","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"message":{"description":"The operator's naming brief or follow-up. Omit to apply feedback or resume incomplete work.","type":"string","minLength":1,"maxLength":12000},"session":{"description":"Carry the complete returned session unchanged between turns.","type":"object","properties":{"version":{"type":"number","const":1},"teamId":{"type":"string","minLength":1},"messages":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000},"local":{"type":"boolean"},"kind":{"type":"string","const":"feedback"}},"required":["role","content"]}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"},"checkedAt":{"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))$"},"availabilitySource":{"type":"string","enum":["dsapi","rdap","local"]},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0},"formatted":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":1,"maxLength":8}},"required":["amount","formatted","currency"]},{"type":"null"}]},"ranking":{"type":"string","enum":["pending","scoring","scored","error"]}},"required":["domain","reason","score","id","number","selected","taste","availability","ranking"]}},"pending":{"type":"object","properties":{"body":{"type":"object","properties":{"teamId":{"type":"string","minLength":1},"phase":{"type":"string","enum":["initial","enrichment","refinement","replacement"]},"automatic":{"type":"boolean"},"poolPolicy":{"description":"Request ranked available pools. Omit this field to keep neutral replacement limits.","type":"string","const":"ranked-available"},"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000}},"required":["role","content"]}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"}},"required":["domain","reason","score","id","number","selected","taste","availability"]}}},"required":["phase","messages","suggestions"],"description":"The unchanged input for a generation pass that has not completed."},"acceptedIds":{"description":"Suggestion IDs that this pass added. Other concurrent passes do not use its budget.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"baselineIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"Suggestion IDs present before this pass, used to preserve its generation budget after retry."},"slots":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"The original unavailable suggestion IDs that replacement may retire."}},"required":["body","baselineIds","slots"]},"replacement":{"type":"object","properties":{"body":{"type":"object","properties":{"teamId":{"type":"string","minLength":1},"phase":{"type":"string","enum":["initial","enrichment","refinement","replacement"]},"automatic":{"type":"boolean"},"poolPolicy":{"description":"Request ranked available pools. Omit this field to keep neutral replacement limits.","type":"string","const":"ranked-available"},"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000}},"required":["role","content"]}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"}},"required":["domain","reason","score","id","number","selected","taste","availability"]}}},"required":["phase","messages","suggestions"],"description":"The unchanged input for a generation pass that has not completed."},"acceptedIds":{"description":"Suggestion IDs that this pass added. Other concurrent passes do not use its budget.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"baselineIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"Suggestion IDs present before this pass, used to preserve its generation budget after retry."},"slots":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"The original unavailable suggestion IDs that replacement may retire."}},"required":["body","baselineIds","slots"]}},"required":["version","messages","suggestions"]},"feedback":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":253,"description":"Stable suggestion ID from the returned session; display reference numbers are only for people."},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"selected":{"type":"boolean"}},"required":["id"]}}}}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":12000},"session":{"type":"object","properties":{"version":{"type":"number","const":1},"teamId":{"type":"string","minLength":1},"messages":{"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000},"local":{"type":"boolean"},"kind":{"type":"string","const":"feedback"}},"required":["role","content"],"additionalProperties":false}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"},"checkedAt":{"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))$"},"availabilitySource":{"type":"string","enum":["dsapi","rdap","local"]},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0},"formatted":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":1,"maxLength":8}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}]},"ranking":{"type":"string","enum":["pending","scoring","scored","error"]}},"required":["domain","reason","score","id","number","selected","taste","availability","ranking"],"additionalProperties":false}},"pending":{"type":"object","properties":{"body":{"type":"object","properties":{"teamId":{"type":"string","minLength":1},"phase":{"type":"string","enum":["initial","enrichment","refinement","replacement"]},"automatic":{"type":"boolean"},"poolPolicy":{"description":"Request ranked available pools. Omit this field to keep neutral replacement limits.","type":"string","const":"ranked-available"},"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000}},"required":["role","content"],"additionalProperties":false}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"}},"required":["domain","reason","score","id","number","selected","taste","availability"],"additionalProperties":false}}},"required":["phase","messages","suggestions"],"additionalProperties":false,"description":"The unchanged input for a generation pass that has not completed."},"acceptedIds":{"description":"Suggestion IDs that this pass added. Other concurrent passes do not use its budget.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"baselineIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"Suggestion IDs present before this pass, used to preserve its generation budget after retry."},"slots":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"The original unavailable suggestion IDs that replacement may retire."}},"required":["body","baselineIds","slots"],"additionalProperties":false},"replacement":{"type":"object","properties":{"body":{"type":"object","properties":{"teamId":{"type":"string","minLength":1},"phase":{"type":"string","enum":["initial","enrichment","refinement","replacement"]},"automatic":{"type":"boolean"},"poolPolicy":{"description":"Request ranked available pools. Omit this field to keep neutral replacement limits.","type":"string","const":"ranked-available"},"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000}},"required":["role","content"],"additionalProperties":false}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"}},"required":["domain","reason","score","id","number","selected","taste","availability"],"additionalProperties":false}}},"required":["phase","messages","suggestions"],"additionalProperties":false,"description":"The unchanged input for a generation pass that has not completed."},"acceptedIds":{"description":"Suggestion IDs that this pass added. Other concurrent passes do not use its budget.","maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"baselineIds":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"Suggestion IDs present before this pass, used to preserve its generation budget after retry."},"slots":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":253},"description":"The original unavailable suggestion IDs that replacement may retire."}},"required":["body","baselineIds","slots"],"additionalProperties":false}},"required":["version","messages","suggestions"],"additionalProperties":false},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"},"checkedAt":{"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))$"},"availabilitySource":{"type":"string","enum":["dsapi","rdap","local"]},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0},"formatted":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":1,"maxLength":8}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}]},"ranking":{"type":"string","enum":["pending","scoring","scored","error"]},"reference":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Current displayed row number. Use id for durable feedback."},"displayPrice":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number","minimum":0},"formatted":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":1,"maxLength":8}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}],"description":"First-year price including fees, matching the dashboard; null when no quote exists."}},"required":["domain","reason","score","id","number","selected","taste","availability","ranking","reference","displayPrice"],"additionalProperties":false}},"topPick":{"type":["string","null"]},"complete":{"type":"boolean","description":"False when a stage needs retry. Keep this session and inspect problems."},"problems":{"type":"array","items":{"type":"object","properties":{"stage":{"type":"string","enum":["generation","ranking","availability","replacement"]},"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"retryAfterSeconds":{"type":"number","minimum":0}},"required":["stage","code","message"],"additionalProperties":false}}},"required":["message","session","suggestions","topPick","complete","problems"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/research/conversation":{"post":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"x-spacefast-read-only":true,"operationId":"continueDomainConversation","summary":"Find domains in a conversation","description":"Streams new domain suggestions, followed by a completed reply or a typed error. With enrich, a stream that confirms it in X-Spacefast-Domain-Results also sends each suggested name's availability, and a Jev score for names not registered or known to be unsellable. These lines can follow the reply. Current selections, taste and stable reference numbers remain user-owned.","responses":{"200":{"description":"Newline-delimited JSON suggestion, done and error events, plus availability, score and skipped events when enrichment is confirmed.","headers":{"X-Spacefast-Domain-Results":{"description":"enriched when this stream carries result lines. Without it, check and score the names directly. New results stop 60 seconds after the reply, so check or score directly any name the stream leaves unanswered when it ends.","schema":{"type":"string","enum":["enriched"]}}},"content":{"application/x-ndjson":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["suggestion"]},"suggestion":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100}},"required":["domain","reason","score"],"additionalProperties":false}},"required":["type","suggestion"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["done"]},"reply":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":12000},"suggestions":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100}},"required":["domain","reason","score"],"additionalProperties":false}},"rankedDomains":{"maxItems":212,"type":"array","items":{"type":"string","maxLength":253}},"model":{"type":"string","minLength":1,"maxLength":100}},"required":["message","suggestions","rankedDomains","model"],"additionalProperties":false}},"required":["type","reply"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["type","error"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["availability"]},"availability":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"status":{"type":"string","enum":["unregistered","registered","unknown"]},"checkedAt":{"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))$"},"sellable":{"type":"boolean"},"price":{"nullable":true,"type":"object","properties":{"amount":{"type":"number","minimum":0},"formatted":{"type":"string","maxLength":40},"currency":{"type":"string","minLength":1,"maxLength":8}},"required":["amount","formatted","currency"],"additionalProperties":false},"source":{"type":"string","enum":["dsapi","rdap","local"]}},"required":["domain","status"],"additionalProperties":false}},"required":["type","availability"],"additionalProperties":false,"description":"One suggested name's availability. Sent only on an enriched stream."},{"type":"object","properties":{"type":{"type":"string","enum":["score"]},"score":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1},"domain":{"type":"string","maxLength":253}},"required":["score","confidence","domain"],"additionalProperties":false}},"required":["type","score"],"additionalProperties":false,"description":"One suggested name's Jev score. Sent only on an enriched stream, for names not registered or known to be unsellable."},{"type":"object","properties":{"type":{"type":"string","enum":["skipped"]},"skipped":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"stage":{"type":"string","enum":["availability","ranking"]},"code":{"type":"string","minLength":1},"retryAfterSeconds":{"type":"number","minimum":0}},"required":["domain","stage","code"],"additionalProperties":false}},"required":["type","skipped"],"additionalProperties":false,"description":"A suggested name this stream did not check or score. Check or score it directly, after retryAfterSeconds when present."}]}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"phase":{"type":"string","enum":["initial","enrichment","refinement","replacement"]},"automatic":{"type":"boolean"},"poolPolicy":{"description":"Request ranked available pools. Omit this field to keep neutral replacement limits.","type":"string","const":"ranked-available"},"messages":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":12000}},"required":["role","content"]}},"suggestions":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","maxLength":253},"reason":{"type":"string","minLength":1,"maxLength":2000},"score":{"type":"number","minimum":0,"maximum":100},"id":{"type":"string","minLength":1,"maxLength":253},"number":{"type":"integer","minimum":1,"maximum":100000},"selected":{"type":"boolean"},"taste":{"type":"string","enum":["neutral","liked","disliked"]},"availability":{"type":"string","enum":["unchecked","checking","unregistered","registered","unknown"]},"sellable":{"type":"boolean"},"jev":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1}},"required":["score","confidence"],"additionalProperties":false},"retired":{"type":"boolean"},"source":{"type":"string","const":"instant"},"hideDescription":{"type":"boolean"}},"required":["domain","reason","score","id","number","selected","taste","availability"]}},"enrich":{"description":"Ask this stream to check suggested names and Jev-score the ones not registered or known to be unsellable, using rankingQuery. Results come only when the response sets X-Spacefast-Domain-Results: enriched. Omit this field to receive only suggestions and the reply.","type":"object","properties":{"rankingQuery":{"type":"string","minLength":1,"maxLength":12000}},"required":["rankingQuery"]}},"required":["phase","messages","suggestions"]}}},"required":true},"tags":["Domains"]}},"/v1/domains/research/rank":{"post":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"x-spacefast-read-only":true,"operationId":"rankDomainCandidates","summary":"Rank domain candidates with Jev","description":"Returns independent domain-name fit scores from 0 to 4 and confidence from 0 to 1. Scores do not establish availability, pricing or trademark clearance.","requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1},"query":{"type":"string","minLength":1,"maxLength":12000},"domains":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":253}}},"required":["query","domains"]}}},"required":true},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"scores":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"score":{"type":"number","minimum":0,"maximum":4},"confidence":{"type":"number","minimum":0,"maximum":1},"domain":{"type":"string","maxLength":253}},"required":["score","confidence","domain"],"additionalProperties":false}}},"required":["scores"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/research/suggestions":{"get":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"operationId":"listDomainSuggestions","summary":"Suggest domains for a query","description":"Returns ranked domain suggestions for a search query.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"What the domain is for: a word, a brand, or a short phrase."}},{"name":"limit","in":"query","required":false,"schema":{"default":96,"description":"Maximum suggestions to return.","type":"integer","minimum":1,"maximum":160}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"query":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"label":{"type":"string"},"sld":{"type":"string"},"tld":{"type":"string"},"source":{"type":"string","enum":["exact","tld","hack","variant","ai"]},"category":{"type":"string","enum":["best","fast","creative","ideas","short","classic","all"]},"score":{"type":"number"},"supportedForPurchase":{"type":"boolean"},"purchasable":{"type":"boolean"},"connectable":{"type":"boolean"},"reason":{"type":"string"}},"required":["domain","label","sld","tld","source","category","score","supportedForPurchase","purchasable","connectable","reason"],"additionalProperties":false}}},"required":["query","suggestions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/research/ideas":{"get":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"operationId":"listDomainIdeas","summary":"Generate domain name ideas","description":"Returns creative domain name ideas derived from a search query.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1}},{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"What the domain is for: a word, a brand, or a short phrase."}},{"name":"limit","in":"query","required":false,"schema":{"default":96,"description":"Maximum suggestions to return.","type":"integer","minimum":1,"maximum":160}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"query":{"type":"string"},"suggestions":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"label":{"type":"string"},"sld":{"type":"string"},"tld":{"type":"string"},"source":{"type":"string","enum":["exact","tld","hack","variant","ai"]},"category":{"type":"string","enum":["best","fast","creative","ideas","short","classic","all"]},"score":{"type":"number"},"supportedForPurchase":{"type":"boolean"},"purchasable":{"type":"boolean"},"connectable":{"type":"boolean"},"reason":{"type":"string"}},"required":["domain","label","sld","tld","source","category","score","supportedForPurchase","purchasable","connectable","reason"],"additionalProperties":false}}},"required":["query","suggestions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/research/availability":{"get":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"operationId":"getDomainAvailability","summary":"Check a domain's availability","description":"Checks whether one domain is available to register, with a live registry check. Use this before buying.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1}},{"name":"name","in":"query","required":false,"schema":{"description":"The domain to look up. Pass this or `domain`; they are the same parameter.","type":"string","minLength":3,"maxLength":253}},{"name":"domain","in":"query","required":false,"schema":{"description":"Alias for `name`. Pass one of the two.","type":"string","minLength":3,"maxLength":253}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":["boolean","null"]},"supportedForPurchase":{"type":"boolean"},"purchasable":{"type":"boolean"},"connectable":{"type":"boolean"},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"formatted":{"type":"string"},"currency":{"type":"string","const":"USD"}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}]},"premium":{"type":"boolean"},"status":{"type":"string","enum":["available","available_elsewhere","taken","unknown","unsupported_tld"]},"source":{"type":"string","enum":["dsapi","rdap","local"]},"checkedAt":{"type":"string"},"error":{"type":["string","null"]}},"required":["domain","available","supportedForPurchase","purchasable","connectable","price","premium","status","source","checkedAt","error"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"post":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"x-spacefast-read-only":true,"operationId":"checkDomainAvailabilityBatch","summary":"Check availability for many domains","description":"Checks a batch of domains against registry zone files in one call. The answer is a fast \"probably available\" signal for search, about a day old, and names on TLDs Spacefast does not sell come back as not sold here. Confirm a domain with the single-domain check before buying.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1},"names":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"domains":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1},"names":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"domains":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1},"names":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"domains":{"minItems":1,"maxItems":80,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domains":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":["boolean","null"]},"supportedForPurchase":{"type":"boolean"},"purchasable":{"type":"boolean"},"connectable":{"type":"boolean"},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"formatted":{"type":"string"},"currency":{"type":"string","const":"USD"}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}]},"premium":{"type":"boolean"},"status":{"type":"string","enum":["available","available_elsewhere","taken","unknown","unsupported_tld"]},"source":{"type":"string","enum":["dsapi","rdap","local"]},"checkedAt":{"type":"string"},"error":{"type":["string","null"]}},"required":["domain","available","supportedForPurchase","purchasable","connectable","price","premium","status","source","checkedAt","error"],"additionalProperties":false}},"results":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"available":{"type":["boolean","null"]},"supportedForPurchase":{"type":"boolean"},"purchasable":{"type":"boolean"},"connectable":{"type":"boolean"},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"number"},"formatted":{"type":"string"},"currency":{"type":"string","const":"USD"}},"required":["amount","formatted","currency"],"additionalProperties":false},{"type":"null"}]},"premium":{"type":"boolean"},"status":{"type":"string","enum":["available","available_elsewhere","taken","unknown","unsupported_tld"]},"source":{"type":"string","enum":["dsapi","rdap","local"]},"checkedAt":{"type":"string"},"error":{"type":["string","null"]}},"required":["domain","available","supportedForPurchase","purchasable","connectable","price","premium","status","source","checkedAt","error"],"additionalProperties":false}}},"required":["domains","results"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/research/whois":{"get":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{}],"operationId":"getDomainWhois","summary":"Look up WHOIS for a domain","description":"Returns public WHOIS registration data for one domain.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Optional team context. Requires access to the team.","type":"string","minLength":1}},{"name":"name","in":"query","required":false,"schema":{"description":"The domain to look up. Pass this or `domain`; they are the same parameter.","type":"string","minLength":3,"maxLength":253}},{"name":"domain","in":"query","required":false,"schema":{"description":"Alias for `name`. Pass one of the two.","type":"string","minLength":3,"maxLength":253}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domain":{"type":"string"},"source":{"type":"string","enum":["rdap","whois"]},"status":{"type":"array","items":{"type":"string"}},"registrar":{"type":["string","null"]},"nameservers":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"date":{"type":"string"}},"required":["action","date"],"additionalProperties":false}},"raw":{}},"required":["domain","source","status","registrar","nameservers","events","raw"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/managed-domains":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listManagedDomains","summary":"List managed space hostnames","description":"Returns read-only, system-managed space.fast and view.fast hostnames for the caller's spaces. Pass `teamId` to limit the result to one team; custom domain inventory stays on /v1/domains.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Return only hostnames owned by spaces in this team.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable managed row id derived from the default hostname row."},"source":{"type":"string","const":"managed_view_fast","description":"System-managed hostname row."},"managed":{"type":"boolean","const":true},"deletable":{"type":"boolean","const":false},"assignable":{"type":"boolean","const":false},"primary":{"type":"boolean","description":"Whether no custom primary domain overrides the managed URL."},"name":{"type":"string","description":"Managed hostname."},"unicodeName":{"type":"string"},"kind":{"type":"string","const":"hostname"},"publicName":{"type":"string","description":"Left-hand public project label for the managed hostname."},"verification":{"type":"object","properties":{"status":{"type":"string","const":"not_required"},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false},"attachedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"The first recorded time that Spacefast attached this managed hostname."},"createdAt":{"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))$"},"updatedAt":{"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))$"},"spaceId":{"type":"string","description":"Space that owns this managed hostname."},"spaceSlug":{"type":"string","description":"Current project slug for the owning space."},"spaceTitle":{"type":"string","description":"Current title for the owning space."}},"required":["id","source","managed","deletable","assignable","primary","name","kind","publicName","verification","attachedAt","createdAt","updatedAt","spaceId","spaceSlug","spaceTitle"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/domains/preflight":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"preflightDomain","summary":"Preflight a domain before adding it","description":"Canonicalizes the hostname and returns an advisory hostability verdict. A negative verdict usually means the domain is already in use with another host — it can still be added and claimed with a TXT ownership proof, so treat the verdict as a warning, not a block.","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Apex or concrete hostname to preflight; canonicalized server-side."}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Team the domain would be added to. Defaults the same way `POST /v1/domains` does.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"name":{"type":"string","description":"Canonical lowercase ASCII form of the requested hostname."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Whether the name is the registrable domain itself or a hostname under one. Decided server-side against the Public Suffix List, so `example.co.uk` is an apex and `www.example.com` is not."},"canHost":{"description":"Provider hostability verdict. `null` when the provider check was unavailable; treat as unknown, not as failure.","type":["boolean","null"]},"providerMessage":{"description":"Provider-reported reason when the verdict is negative.","type":["string","null"]}},"required":["name","kind","canHost","providerMessage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/contacts":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listDomainContacts","summary":"List saved registrant contacts","description":"Returns the registrant contacts saved for buying domains, most recently changed first. Pass `teamId` to limit the result to one team.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Return only this team's contacts. Defaults to every team you can read.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"id":{"type":"string","description":"Contact id (`dcon_...`)."},"teamId":{"type":"string","description":"Team that owns the contact."},"updatedAt":{"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":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone","id","teamId","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"createDomainContact","summary":"Save a registrant contact","description":"Saves the person or organization a domain is registered to. Ask the user for these details; never invent them. Pass its id as `contactId` to purchaseDomain. One contact per team is usually enough; reuse it from listDomainContacts.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1}},"required":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1}},"required":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1}},"required":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"id":{"type":"string","description":"Contact id (`dcon_...`)."},"teamId":{"type":"string","description":"Team that owns the contact."},"updatedAt":{"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":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone","id","teamId","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/contacts/{contactId}":{"patch":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"updateDomainContact","summary":"Update a registrant contact","description":"Changes a saved registrant contact. Only future purchases use the new details; domains already registered keep theirs.","parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","minLength":1,"description":"Contact id (`dcon_...`)."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":80},"lastName":{"type":"string","minLength":1,"maxLength":80},"organization":{"type":"string","maxLength":120},"address1":{"type":"string","minLength":1,"maxLength":160},"address2":{"type":"string","maxLength":160},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":32},"countryCode":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":7,"maxLength":32},"id":{"type":"string","description":"Contact id (`dcon_...`)."},"teamId":{"type":"string","description":"Team that owns the contact."},"updatedAt":{"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":["firstName","lastName","address1","city","state","postalCode","countryCode","email","phone","id","teamId","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/{domainId}/verify":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"verifyDomain","summary":"Verify a domain's DNS","description":"Checks the domain DNS for proof of control, updates verification state, and syncs the bound space runtime when needed.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain inventory record id (`dom_...`)."},"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"name":{"type":"string","description":"Canonical lowercase ASCII A-labels (IDNA2008/punycode), no trailing dot, no wildcard label."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"spaceId":{"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains.","type":["string","null"]},"primary":{"type":"boolean","description":"Whether this domain is its Space's primary hostname (feeds `liveUrl`)."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"derivedGroup":{"type":"string","description":"PSL registrable domain of `name`; server-computed, never client-supplied."},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Proof-of-control read model."},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"createdAt":{"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))$","description":"Instant when the record was created."},"updatedAt":{"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))$","description":"Instant when the record last changed."}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/{domainId}/diagnostics":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getDomainDiagnostics","summary":"Get domain diagnostics","description":"Returns DNS observations, setup instructions, and SSL state for one of your domains.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Configured hostname."},"diagnostics":{"description":"Domain-level setup nudges computed at read time, for example \"companion_hostname_unbound\" when the apex/www pair is half-bound.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"hostnameDiagnostics":{"type":"array","items":{"type":"object","properties":{"hostname":{"type":"string","description":"Hostname this diagnostic block describes."},"purpose":{"type":"string","enum":["apex","www","configured"],"description":"Why this hostname is checked: the apex, its www twin, or the configured name."},"isConfiguredHostname":{"type":"boolean","description":"Whether this is the hostname on the domain record."},"providerIps":{"default":[],"description":"Provider IPs the hostname should point at.","type":"array","items":{"type":"string"}},"verificationCode":{"description":"Expected TXT verification value.","type":["string","null"]},"dnsInstructions":{"default":[],"description":"DNS records required for this hostname.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"dns":{"type":"object","properties":{"observedAt":{"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))$"},"expectedTxtValue":{"type":["string","null"]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"description":"Whether observed A records look proxied.","type":["boolean","null"]},"txtVerified":{"description":"Whether the verification TXT is observed.","type":["boolean","null"]},"hasAaaaRecords":{"type":"boolean"},"hasCaaRecords":{"type":"boolean"},"records":{"type":"object","properties":{"a":{"default":[],"type":"array","items":{"type":"string"}},"aaaa":{"default":[],"type":"array","items":{"type":"string"}},"caa":{"default":[],"type":"array","items":{"type":"string"}},"cname":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","txt"],"additionalProperties":false},"byResolver":{"default":[],"type":"array","items":{"type":"object","properties":{"resolver":{"type":"string","description":"Public resolver the snapshot was taken from."},"a":{"default":[],"type":"array","items":{"type":"string"}},"aaaa":{"default":[],"type":"array","items":{"type":"string"}},"caa":{"default":[],"type":"array","items":{"type":"string"}},"cname":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","txt"],"additionalProperties":false}}},"required":["observedAt","expectedTxtValue","pointsToProvider","proxyDetected","txtVerified","hasAaaaRecords","hasCaaRecords","records","byResolver"],"additionalProperties":false},"ssl":{"type":"object","properties":{"status":{"type":"string","enum":["missing","pending","active","broken"],"description":"Certificate state."},"canRetry":{"type":"boolean","description":"Whether SSL provisioning can be retried now."},"certificateId":{"type":["string","null"]},"validationExpiration":{"type":["string","null"]},"authzUri":{"type":["string","null"]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"type":["string","null"]},"lastError":{"type":["string","null"]},"retryDate":{"type":["string","null"]},"failCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["reason","lastError","retryDate","failCount"],"additionalProperties":false},{"type":"null"}]}},"required":["status","canRetry","certificateId","validationExpiration","authzUri","brokenRecord"],"additionalProperties":false}},"required":["hostname","purpose","isConfiguredHostname","providerIps","verificationCode","dnsInstructions","dns","ssl"],"additionalProperties":false},"description":"Per-hostname DNS and SSL connectivity diagnostics."}},"required":["domainId","hostname","hostnameDiagnostics"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/{domainId}/ssl/retry":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"retryDomainSsl","summary":"Retry SSL for a domain","description":"Retries SSL certificate issuance for an assigned domain and returns updated diagnostics.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"requestedAt":{"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))$","description":"When the retry was accepted."}},"required":["requestedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/{domainId}":{"patch":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"updateDomain","summary":"Update a domain","description":"Assigns or unassigns the domain, changes its whole-host redirect, or updates metadata (`wildcardEnabled`). Facet modes change only via POST /dns and POST /registration. The response includes the runtime update operation.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"wildcardEnabled":{"type":"boolean","description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them."}},"required":["wildcardEnabled"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space this hostname should select."},"primary":{"type":"boolean","description":"Whether this domain becomes its Space's primary hostname."},"redirect":{"description":"Whole-host redirect target, or null to clear it.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null","description":"Pass null to unassign the domain from its Space."}},"required":["spaceId"],"additionalProperties":false},{"type":"object","properties":{"redirect":{"anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}],"description":"Whole-host redirect target, or null to clear it."}},"required":["redirect"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"wildcardEnabled":{"type":"boolean","description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them."}},"required":["wildcardEnabled"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space this hostname should select."},"primary":{"type":"boolean","description":"Whether this domain becomes its Space's primary hostname."},"redirect":{"description":"Whole-host redirect target, or null to clear it.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null","description":"Pass null to unassign the domain from its Space."}},"required":["spaceId"],"additionalProperties":false},{"type":"object","properties":{"redirect":{"anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}],"description":"Whole-host redirect target, or null to clear it."}},"required":["redirect"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"wildcardEnabled":{"type":"boolean","description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them."}},"required":["wildcardEnabled"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space this hostname should select."},"primary":{"type":"boolean","description":"Whether this domain becomes its Space's primary hostname."},"redirect":{"description":"Whole-host redirect target, or null to clear it.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null","description":"Pass null to unassign the domain from its Space."}},"required":["spaceId"],"additionalProperties":false},{"type":"object","properties":{"redirect":{"anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}],"description":"Whole-host redirect target, or null to clear it."}},"required":["redirect"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain inventory record id (`dom_...`)."},"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"name":{"type":"string","description":"Canonical lowercase ASCII A-labels (IDNA2008/punycode), no trailing dot, no wildcard label."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"spaceId":{"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains.","type":["string","null"]},"primary":{"type":"boolean","description":"Whether this domain is its Space's primary hostname (feeds `liveUrl`)."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"derivedGroup":{"type":"string","description":"PSL registrable domain of `name`; server-computed, never client-supplied."},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Proof-of-control read model."},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"createdAt":{"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))$","description":"Instant when the record was created."},"updatedAt":{"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))$","description":"Instant when the record last changed."}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"delete":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"deleteDomain","summary":"Delete a domain management record","description":"Delete an unbound domain record. Active registrations, attached provider zones, and unsettled DNS operations block deletion.","responses":{"204":{"description":"The domain management record was deleted."}},"parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"tags":["Domains"]},"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getDomain","summary":"Get a domain inventory record","description":"Return a domain record with its verification, Space assignment, registration, and DNS state.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain inventory record id (`dom_...`)."},"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"name":{"type":"string","description":"Canonical lowercase ASCII A-labels (IDNA2008/punycode), no trailing dot, no wildcard label."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"spaceId":{"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains.","type":["string","null"]},"primary":{"type":"boolean","description":"Whether this domain is its Space's primary hostname (feeds `liveUrl`)."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"derivedGroup":{"type":"string","description":"PSL registrable domain of `name`; server-computed, never client-supplied."},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Proof-of-control read model."},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"createdAt":{"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))$","description":"Instant when the record was created."},"updatedAt":{"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))$","description":"Instant when the record last changed."}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listDomains","summary":"List domains","description":"Returns domains across the caller teams, newest first. Pass `teamId` to limit the result to one team. Existing clients receive inventory records and authorized Space attachments, retaining the inventory identity when both exist. Send `Accept: application/json; spacefast-domain-inventory=1` for inventory records only. Responses vary by Accept.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Filter to domains owned by one team.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Domain inventory record id (`dom_...`)."},"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"name":{"type":"string","description":"Canonical lowercase ASCII A-labels (IDNA2008/punycode), no trailing dot, no wildcard label."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"spaceId":{"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains.","type":["string","null"]},"primary":{"type":"boolean","description":"Whether this domain is its Space's primary hostname (feeds `liveUrl`)."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"derivedGroup":{"type":"string","description":"PSL registrable domain of `name`; server-computed, never client-supplied."},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Proof-of-control read model."},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"createdAt":{"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))$","description":"Instant when the record was created."},"updatedAt":{"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))$","description":"Instant when the record last changed."}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"createDomain","summary":"Add a domain to inventory","description":"Create a domain inventory record for an apex or concrete hostname. Assign the hostname to a Space with POST /v1/spaces/{spaceId}/domains.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain for DNS management. This record does not attach a hostname to a Space."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"required":["name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain for DNS management. This record does not attach a hostname to a Space."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"required":["name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain for DNS management. This record does not attach a hostname to a Space."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"required":["name"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Domain inventory record id (`dom_...`)."},"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"name":{"type":"string","description":"Canonical lowercase ASCII A-labels (IDNA2008/punycode), no trailing dot, no wildcard label."},"unicodeName":{"description":"Read-only U-label form, present only when it differs from `name`.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"],"description":"Derived field, never create input: `apex` if and only if `name` equals `derivedGroup`."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"spaceId":{"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains.","type":["string","null"]},"primary":{"type":"boolean","description":"Whether this domain is its Space's primary hostname (feeds `liveUrl`)."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"derivedGroup":{"type":"string","description":"PSL registrable domain of `name`; server-computed, never client-supplied."},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Proof-of-control read model."},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"createdAt":{"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))$","description":"Instant when the record was created."},"updatedAt":{"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))$","description":"Instant when the record last changed."}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/{domainId}/registration":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getDomainRegistration","summary":"Get a domain's registration","description":"Returns the registration or transfer state of an apex domain by id or hostname, or an unregistered record when Spacefast holds no registration for it. Pass `teamId` to restrict live registrations and retained failed purchases to that team. Pass `includeCheckout=true` to get the open Stripe payment link in `purchase.checkout`. You get the link only when you may purchase the domain and have the same billing authority over the paying team as the person who opened the checkout; otherwise `purchase.checkout` is null. A payment-link lookup failure sets `purchase.checkoutUnavailable` without hiding registration status. This read never opens another checkout. After payment a purchase moves `pending_payment` → `pending_registration` → `active`; a `failed` one carries `failureReason` and its refund in `purchase`, and stays readable after the failed purchase releases its domain.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Return only this team's registration, including retained failed purchases. Use this when a hostname may have purchase history in more than one team.","type":"string","minLength":1}},{"name":"includeCheckout","in":"query","required":false,"schema":{"description":"Request the open payment link. You get it only when you may purchase this domain and have the same billing authority over the paying team as the person who opened the checkout. Omit for registration status without a payment-provider lookup.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"description":"Registration or transfer record id; null when unregistered.","type":["string","null"]},"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Registered hostname."},"provider":{"anyOf":[{"type":"string","enum":["dsapi","manual"]},{"type":"null"}],"description":"Wrapped registrar bridge where the registration lives."},"status":{"type":"string","description":"Registration lifecycle status. `pending_payment` means checkout is open and nothing is registered yet."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the registration expires."},"redemptionEndsAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the redemption window ends after expiry."},"autoRenew":{"type":"boolean","description":"Saved auto-renew preference. Nothing renews on its own yet; renew by hand."},"transferLock":{"type":"boolean","description":"Whether outbound transfers are locked."},"privacySetting":{"anyOf":[{"type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},{"type":"null"}],"description":"WHOIS privacy behavior."},"contactId":{"description":"Registrant contact record.","type":["string","null"]},"failureReason":{"description":"Provider failure detail when status is `failed`.","type":["string","null"]},"purchase":{"anyOf":[{"type":"object","properties":{"intentId":{"type":"string","description":"Purchase intent that paid for this line."},"lineStatus":{"type":"string","enum":["awaiting_payment","submitting","settled","refunding","refunded","cancelled"]},"checkout":{"description":"The open payment link, when you request includeCheckout. You get it only when you may purchase this domain and have the same billing authority over the paying team as the person who opened the checkout. Null when you cannot get an open link; check checkoutUnavailable for lookup failures. Omitted when you do not request it or may not purchase this domain.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Existing Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this existing checkout to complete payment."},"expiresAt":{"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))$","description":"When this checkout expires."}},"required":["id","url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"checkoutUnavailable":{"description":"True when the requested payment link could not be retrieved or verified. Registration status remains available. Retry the read to recover the existing checkout; do not start another purchase.","type":"boolean"},"quotedFeeAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Registrar fee before tax, in cents."},"paidAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer paid for this line, tax included, in cents."},"refund":{"anyOf":[{"type":"object","properties":{"reference":{"type":"string","description":"Stripe refund id."},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundedAt":{"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":["reference","amountCents","refundedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["intentId","lineStatus","quotedFeeAmountCents","paidAmountCents","refund"],"additionalProperties":false},{"type":"null"}],"description":"Money state of the current purchase or renewal line; null when none is in flight."},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","domainId","hostname","provider","status","expiresAt","redemptionEndsAt","autoRenew","transferLock","privacySetting","contactId","failureReason","purchase","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"createDomainRegistrationAction","summary":"Renew or register a held domain","description":"`renew` (and `purchase`, a one-name purchaseDomain) returns `data.checkout.url` for a person to open; nothing is charged until they pay there, and the registrar is asked only after payment. Poll getDomainRegistration for the outcome. Transfers aren't available yet: `transfer_in` and `transfer_out` refuse with `domain_transfer_unavailable` and change nothing.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"purchase"},"period":{"description":"Registration period in years.","type":"integer","minimum":1,"maximum":10},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"renew"},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_in"},"authCode":{"type":"string","minLength":1,"maxLength":255,"description":"Transfer authorization code from the current registrar."},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action","authCode"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_out"}},"required":["action"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"purchase"},"period":{"description":"Registration period in years.","type":"integer","minimum":1,"maximum":10},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"renew"},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_in"},"authCode":{"type":"string","minLength":1,"maxLength":255,"description":"Transfer authorization code from the current registrar."},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action","authCode"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_out"}},"required":["action"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"purchase"},"period":{"description":"Registration period in years.","type":"integer","minimum":1,"maximum":10},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"renew"},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_in"},"authCode":{"type":"string","minLength":1,"maxLength":255,"description":"Transfer authorization code from the current registrar."},"contactId":{"description":"Registrant contact record to use.","type":"string","minLength":1}},"required":["action","authCode"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer_out"}},"required":["action"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"registration":{"type":"object","properties":{"id":{"description":"Registration or transfer record id; null when unregistered.","type":["string","null"]},"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Registered hostname."},"provider":{"anyOf":[{"type":"string","enum":["dsapi","manual"]},{"type":"null"}],"description":"Wrapped registrar bridge where the registration lives."},"status":{"type":"string","description":"Registration lifecycle status. `pending_payment` means checkout is open and nothing is registered yet."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the registration expires."},"redemptionEndsAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the redemption window ends after expiry."},"autoRenew":{"type":"boolean","description":"Saved auto-renew preference. Nothing renews on its own yet; renew by hand."},"transferLock":{"type":"boolean","description":"Whether outbound transfers are locked."},"privacySetting":{"anyOf":[{"type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},{"type":"null"}],"description":"WHOIS privacy behavior."},"contactId":{"description":"Registrant contact record.","type":["string","null"]},"failureReason":{"description":"Provider failure detail when status is `failed`.","type":["string","null"]},"purchase":{"anyOf":[{"type":"object","properties":{"intentId":{"type":"string","description":"Purchase intent that paid for this line."},"lineStatus":{"type":"string","enum":["awaiting_payment","submitting","settled","refunding","refunded","cancelled"]},"checkout":{"description":"The open payment link, when you request includeCheckout. You get it only when you may purchase this domain and have the same billing authority over the paying team as the person who opened the checkout. Null when you cannot get an open link; check checkoutUnavailable for lookup failures. Omitted when you do not request it or may not purchase this domain.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Existing Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this existing checkout to complete payment."},"expiresAt":{"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))$","description":"When this checkout expires."}},"required":["id","url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"checkoutUnavailable":{"description":"True when the requested payment link could not be retrieved or verified. Registration status remains available. Retry the read to recover the existing checkout; do not start another purchase.","type":"boolean"},"quotedFeeAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Registrar fee before tax, in cents."},"paidAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer paid for this line, tax included, in cents."},"refund":{"anyOf":[{"type":"object","properties":{"reference":{"type":"string","description":"Stripe refund id."},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundedAt":{"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":["reference","amountCents","refundedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["intentId","lineStatus","quotedFeeAmountCents","paidAmountCents","refund"],"additionalProperties":false},{"type":"null"}],"description":"Money state of the current purchase or renewal line; null when none is in flight."},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","domainId","hostname","provider","status","expiresAt","redemptionEndsAt","autoRenew","transferLock","privacySetting","contactId","failureReason","purchase","createdAt","updatedAt"],"additionalProperties":false},"checkout":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this to pay. Nothing is charged until payment completes here."},"expiresAt":{"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))$"},"subtotalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","const":"USD"},"lines":{"type":"array","items":{"type":"object","properties":{"domainId":{"type":"string"},"registrationId":{"type":"string"},"name":{"type":"string"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price before tax, in cents: the registrar fee plus any ICANN fee."}},"required":["domainId","registrationId","name","amountCents"],"additionalProperties":false}}},"required":["id","url","expiresAt","subtotalCents","currency","lines"],"additionalProperties":false},{"type":"null"}],"description":"Payment step for renew and purchase; null when nothing is due."}},"required":["registration","checkout"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"updateDomainRegistration","summary":"Update registration settings","description":"Changes settings of a domain the team registered through Spacefast: `transferLock`, WHOIS `privacySetting`, the registrant (`contactId` of a saved contact), and the `autoRenew` preference. Unlocking transfers, turning off privacy, or changing the registrant affects who controls the domain and whose details are public, so make those changes only at the user's request. `autoRenew` is saved as a preference only; nothing renews automatically yet, and renewal is a separate registration action.","parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"autoRenew":{"description":"Saves the auto-renew preference. Nothing renews on its own yet; renew with `{ action: \"renew\" }`.","type":"boolean"},"transferLock":{"description":"Pass `true` to enable the registrar transfer lock. Pass `false` to disable it.","type":"boolean"},"privacySetting":{"description":"WHOIS privacy behavior.","type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},"contactId":{"description":"Registrant contact record.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"autoRenew":{"description":"Saves the auto-renew preference. Nothing renews on its own yet; renew with `{ action: \"renew\" }`.","type":"boolean"},"transferLock":{"description":"Pass `true` to enable the registrar transfer lock. Pass `false` to disable it.","type":"boolean"},"privacySetting":{"description":"WHOIS privacy behavior.","type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},"contactId":{"description":"Registrant contact record.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"autoRenew":{"description":"Saves the auto-renew preference. Nothing renews on its own yet; renew with `{ action: \"renew\" }`.","type":"boolean"},"transferLock":{"description":"Pass `true` to enable the registrar transfer lock. Pass `false` to disable it.","type":"boolean"},"privacySetting":{"description":"WHOIS privacy behavior.","type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},"contactId":{"description":"Registrant contact record.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"description":"Registration or transfer record id; null when unregistered.","type":["string","null"]},"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Registered hostname."},"provider":{"anyOf":[{"type":"string","enum":["dsapi","manual"]},{"type":"null"}],"description":"Wrapped registrar bridge where the registration lives."},"status":{"type":"string","description":"Registration lifecycle status. `pending_payment` means checkout is open and nothing is registered yet."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the registration expires."},"redemptionEndsAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the redemption window ends after expiry."},"autoRenew":{"type":"boolean","description":"Saved auto-renew preference. Nothing renews on its own yet; renew by hand."},"transferLock":{"type":"boolean","description":"Whether outbound transfers are locked."},"privacySetting":{"anyOf":[{"type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},{"type":"null"}],"description":"WHOIS privacy behavior."},"contactId":{"description":"Registrant contact record.","type":["string","null"]},"failureReason":{"description":"Provider failure detail when status is `failed`.","type":["string","null"]},"purchase":{"anyOf":[{"type":"object","properties":{"intentId":{"type":"string","description":"Purchase intent that paid for this line."},"lineStatus":{"type":"string","enum":["awaiting_payment","submitting","settled","refunding","refunded","cancelled"]},"checkout":{"description":"The open payment link, when you request includeCheckout. You get it only when you may purchase this domain and have the same billing authority over the paying team as the person who opened the checkout. Null when you cannot get an open link; check checkoutUnavailable for lookup failures. Omitted when you do not request it or may not purchase this domain.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Existing Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this existing checkout to complete payment."},"expiresAt":{"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))$","description":"When this checkout expires."}},"required":["id","url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"checkoutUnavailable":{"description":"True when the requested payment link could not be retrieved or verified. Registration status remains available. Retry the read to recover the existing checkout; do not start another purchase.","type":"boolean"},"quotedFeeAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Registrar fee before tax, in cents."},"paidAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer paid for this line, tax included, in cents."},"refund":{"anyOf":[{"type":"object","properties":{"reference":{"type":"string","description":"Stripe refund id."},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundedAt":{"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":["reference","amountCents","refundedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["intentId","lineStatus","quotedFeeAmountCents","paidAmountCents","refund"],"additionalProperties":false},{"type":"null"}],"description":"Money state of the current purchase or renewal line; null when none is in flight."},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","domainId","hostname","provider","status","expiresAt","redemptionEndsAt","autoRenew","transferLock","privacySetting","contactId","failureReason","purchase","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/domains/purchases":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"purchaseDomain","summary":"Buy domains","description":"Buys up to 10 registrable apex domains in one checkout. Quotes each, adds it to the team's inventory, and holds them all for one payment. Returns every registration (`pending_payment`) and `data.checkout.url` for a person to open and pay; nothing is registered or charged until they do. One name that can't be bought refuses the whole cart. Pass `expectedTotalCents` (before tax) to refuse if the price moved. A hostname the team already holds is registered on its existing record.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domains":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain; canonicalized server-side."},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["name"],"additionalProperties":false},"description":"Domains to buy in one checkout (up to 10)."},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1},"contactId":{"type":"string","minLength":1,"description":"Registrant contact (`dcon_...`) from createDomainContact."},"expectedTotalCents":{"description":"Refuse with domain_checkout_total_changed if the live total (before tax, ICANN fees included) differs.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["domains","contactId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domains":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain; canonicalized server-side."},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["name"],"additionalProperties":false},"description":"Domains to buy in one checkout (up to 10)."},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1},"contactId":{"type":"string","minLength":1,"description":"Registrant contact (`dcon_...`) from createDomainContact."},"expectedTotalCents":{"description":"Refuse with domain_checkout_total_changed if the live total (before tax, ICANN fees included) differs.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["domains","contactId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domains":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Registrable apex domain; canonicalized server-side."},"period":{"description":"Years. Only 1 is offered today.","type":"number","const":1}},"required":["name"],"additionalProperties":false},"description":"Domains to buy in one checkout (up to 10)."},"teamId":{"description":"Owning team. Defaults to the active team.","type":"string","minLength":1},"contactId":{"type":"string","minLength":1,"description":"Registrant contact (`dcon_...`) from createDomainContact."},"expectedTotalCents":{"description":"Refuse with domain_checkout_total_changed if the live total (before tax, ICANN fees included) differs.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["domains","contactId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"registrations":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Registration or transfer record id; null when unregistered.","type":["string","null"]},"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Registered hostname."},"provider":{"anyOf":[{"type":"string","enum":["dsapi","manual"]},{"type":"null"}],"description":"Wrapped registrar bridge where the registration lives."},"status":{"type":"string","description":"Registration lifecycle status. `pending_payment` means checkout is open and nothing is registered yet."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the registration expires."},"redemptionEndsAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant when the redemption window ends after expiry."},"autoRenew":{"type":"boolean","description":"Saved auto-renew preference. Nothing renews on its own yet; renew by hand."},"transferLock":{"type":"boolean","description":"Whether outbound transfers are locked."},"privacySetting":{"anyOf":[{"type":"string","enum":["enable_privacy_service","redact_contact_info","disclose_contact_info"]},{"type":"null"}],"description":"WHOIS privacy behavior."},"contactId":{"description":"Registrant contact record.","type":["string","null"]},"failureReason":{"description":"Provider failure detail when status is `failed`.","type":["string","null"]},"purchase":{"anyOf":[{"type":"object","properties":{"intentId":{"type":"string","description":"Purchase intent that paid for this line."},"lineStatus":{"type":"string","enum":["awaiting_payment","submitting","settled","refunding","refunded","cancelled"]},"checkout":{"description":"The open payment link, when you request includeCheckout. You get it only when you may purchase this domain and have the same billing authority over the paying team as the person who opened the checkout. Null when you cannot get an open link; check checkoutUnavailable for lookup failures. Omitted when you do not request it or may not purchase this domain.","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Existing Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this existing checkout to complete payment."},"expiresAt":{"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))$","description":"When this checkout expires."}},"required":["id","url","expiresAt"],"additionalProperties":false},{"type":"null"}]},"checkoutUnavailable":{"description":"True when the requested payment link could not be retrieved or verified. Registration status remains available. Retry the read to recover the existing checkout; do not start another purchase.","type":"boolean"},"quotedFeeAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Registrar fee before tax, in cents."},"paidAmountCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"What the customer paid for this line, tax included, in cents."},"refund":{"anyOf":[{"type":"object","properties":{"reference":{"type":"string","description":"Stripe refund id."},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"refundedAt":{"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":["reference","amountCents","refundedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["intentId","lineStatus","quotedFeeAmountCents","paidAmountCents","refund"],"additionalProperties":false},{"type":"null"}],"description":"Money state of the current purchase or renewal line; null when none is in flight."},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","domainId","hostname","provider","status","expiresAt","redemptionEndsAt","autoRenew","transferLock","privacySetting","contactId","failureReason","purchase","createdAt","updatedAt"],"additionalProperties":false}},"checkout":{"type":"object","properties":{"id":{"type":"string","description":"Stripe Checkout session id."},"url":{"type":"string","format":"uri","description":"Open this to pay. Nothing is charged until payment completes here."},"expiresAt":{"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))$"},"subtotalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string","const":"USD"},"lines":{"type":"array","items":{"type":"object","properties":{"domainId":{"type":"string"},"registrationId":{"type":"string"},"name":{"type":"string"},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Price before tax, in cents: the registrar fee plus any ICANN fee."}},"required":["domainId","registrationId","name","amountCents"],"additionalProperties":false}}},"required":["id","url","expiresAt","subtotalCents","currency","lines"],"additionalProperties":false}},"required":["registrations","checkout"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Always null: nothing runs until payment completes."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:read"]},{"oauth2":["spaces:read"]}],"operationId":"listSpaceDomains","summary":"List a Space's domains","description":"Return the managed hostnames and custom domains attached to this Space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Stable managed row id derived from the default hostname row."},"source":{"type":"string","const":"managed_view_fast","description":"System-managed hostname row."},"managed":{"type":"boolean","const":true},"deletable":{"type":"boolean","const":false},"assignable":{"type":"boolean","const":false},"primary":{"type":"boolean","description":"Whether no custom primary domain overrides the managed URL."},"name":{"type":"string","description":"Managed hostname."},"unicodeName":{"type":"string"},"kind":{"type":"string","const":"hostname"},"publicName":{"type":"string","description":"Left-hand public project label for the managed hostname."},"verification":{"type":"object","properties":{"status":{"type":"string","const":"not_required"},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false},"attachedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"The first recorded time that Spacefast attached this managed hostname."},"createdAt":{"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))$"},"updatedAt":{"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","source","managed","deletable","assignable","primary","name","kind","publicName","verification","attachedAt","createdAt","updatedAt"],"additionalProperties":false},{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false}]}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"addSpaceCustomDomain","summary":"Attach a custom domain","description":"Attach a hostname to this Space. Spacefast checks the hostname and provisions SSL. Pass `redirect` to answer the hostname with a whole-host redirect instead of serving the Space. If the hostname is attached to another Space, the response is a Spacefast TXT ownership challenge; verifying it moves the attachment after provider cleanup.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to attach. An apex or www hostname also connects its counterpart."},"primary":{"default":false,"description":"Whether this domain becomes the space's primary hostname.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Omit it, or pass null, to serve the Space.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to attach. An apex or www hostname also connects its counterpart."},"primary":{"default":false,"description":"Whether this domain becomes the space's primary hostname.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Omit it, or pass null, to serve the Space.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["name"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":253,"description":"Hostname to attach. An apex or www hostname also connects its counterpart."},"primary":{"default":false,"description":"Whether this domain becomes the space's primary hostname.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Omit it, or pass null, to serve the Space.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getSpaceCustomDomain","summary":"Get a custom domain","description":"Return a custom domain attached to this Space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"patch":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"patchSpaceCustomDomain","summary":"Change how a domain behaves","description":"Select this domain as primary, restore the managed default hostname, answer this hostname with a whole-host redirect, or pass `hostname` to swap which half of an apex/www pair serves the Space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hostname":{"description":"Which of this attachment's two hostnames serves the Space. Accepts the apex or its `www` twin; the other one answers a 308 to it. Any other hostname is refused.","type":"string","minLength":1,"maxLength":253},"primary":{"description":"Set or clear this hostname as the Space's primary URL.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Pass null to serve the Space again.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hostname":{"description":"Which of this attachment's two hostnames serves the Space. Accepts the apex or its `www` twin; the other one answers a 308 to it. Any other hostname is refused.","type":"string","minLength":1,"maxLength":253},"primary":{"description":"Set or clear this hostname as the Space's primary URL.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Pass null to serve the Space again.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hostname":{"description":"Which of this attachment's two hostnames serves the Space. Accepts the apex or its `www` twin; the other one answers a 308 to it. Any other hostname is refused.","type":"string","minLength":1,"maxLength":253},"primary":{"description":"Set or clear this hostname as the Space's primary URL.","type":"boolean"},"redirect":{"description":"Answer this hostname with a whole-host redirect instead of serving the Space. Pass null to serve the Space again.","anyOf":[{"type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"]},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"]}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"default":308,"anyOf":[{"type":"number","const":301},{"type":"number","const":302},{"type":"number","const":307},{"type":"number","const":308}],"description":"HTTP redirect status. Defaults to 308."}},"required":["to"]},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]},"delete":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"deleteSpaceCustomDomain","summary":"Remove a custom domain","description":"Remove the attachment. Returns the operation that removes provider aliases and releases the hostname.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}/verify":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"verifySpaceCustomDomain","summary":"Check a custom domain","description":"Verify a pending ownership claim and move the hostname, or check provider readiness. Set move to use source removal permission instead of TXT proof.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"move":{"description":"Move without TXT proof. Requires permission to remove the source attachment.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}/diagnostics":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getSpaceCustomDomainDiagnostics","summary":"Get Space domain diagnostics","description":"Return DNS observations, provider setup records, and SSL status.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domainId":{"type":"string","description":"Domain inventory record (`dom_...`)."},"hostname":{"type":"string","description":"Configured hostname."},"diagnostics":{"description":"Domain-level setup nudges computed at read time, for example \"companion_hostname_unbound\" when the apex/www pair is half-bound.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"hostnameDiagnostics":{"type":"array","items":{"type":"object","properties":{"hostname":{"type":"string","description":"Hostname this diagnostic block describes."},"purpose":{"type":"string","enum":["apex","www","configured"],"description":"Why this hostname is checked: the apex, its www twin, or the configured name."},"isConfiguredHostname":{"type":"boolean","description":"Whether this is the hostname on the domain record."},"providerIps":{"default":[],"description":"Provider IPs the hostname should point at.","type":"array","items":{"type":"string"}},"verificationCode":{"description":"Expected TXT verification value.","type":["string","null"]},"dnsInstructions":{"default":[],"description":"DNS records required for this hostname.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"dns":{"type":"object","properties":{"observedAt":{"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))$"},"expectedTxtValue":{"type":["string","null"]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"description":"Whether observed A records look proxied.","type":["boolean","null"]},"txtVerified":{"description":"Whether the verification TXT is observed.","type":["boolean","null"]},"hasAaaaRecords":{"type":"boolean"},"hasCaaRecords":{"type":"boolean"},"records":{"type":"object","properties":{"a":{"default":[],"type":"array","items":{"type":"string"}},"aaaa":{"default":[],"type":"array","items":{"type":"string"}},"caa":{"default":[],"type":"array","items":{"type":"string"}},"cname":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","txt"],"additionalProperties":false},"byResolver":{"default":[],"type":"array","items":{"type":"object","properties":{"resolver":{"type":"string","description":"Public resolver the snapshot was taken from."},"a":{"default":[],"type":"array","items":{"type":"string"}},"aaaa":{"default":[],"type":"array","items":{"type":"string"}},"caa":{"default":[],"type":"array","items":{"type":"string"}},"cname":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","txt"],"additionalProperties":false}}},"required":["observedAt","expectedTxtValue","pointsToProvider","proxyDetected","txtVerified","hasAaaaRecords","hasCaaRecords","records","byResolver"],"additionalProperties":false},"ssl":{"type":"object","properties":{"status":{"type":"string","enum":["missing","pending","active","broken"],"description":"Certificate state."},"canRetry":{"type":"boolean","description":"Whether SSL provisioning can be retried now."},"certificateId":{"type":["string","null"]},"validationExpiration":{"type":["string","null"]},"authzUri":{"type":["string","null"]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"type":["string","null"]},"lastError":{"type":["string","null"]},"retryDate":{"type":["string","null"]},"failCount":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["reason","lastError","retryDate","failCount"],"additionalProperties":false},{"type":"null"}]}},"required":["status","canRetry","certificateId","validationExpiration","authzUri","brokenRecord"],"additionalProperties":false}},"required":["hostname","purpose","isConfiguredHostname","providerIps","verificationCode","dnsInstructions","dns","ssl"],"additionalProperties":false},"description":"Per-hostname DNS and SSL connectivity diagnostics."}},"required":["domainId","hostname","hostnameDiagnostics"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}/domain-connect":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getSpaceCustomDomainConnectSetup","summary":"Prepare one-click DNS setup","description":"Discover the hostname's DNS provider through Domain Connect, confirm it carries the Spacefast template, and return a signed approval URL. The records still need approval at the provider and count only once observed.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"available"},"checkedAt":{"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))$"},"provider":{"type":"object","properties":{"id":{"type":"string","description":"DNS provider identifier returned by Domain Connect discovery."},"name":{"type":"string","description":"DNS provider name returned by Domain Connect discovery."},"displayName":{"type":"string"},"controlPanelUrl":{"type":"string","format":"uri"}},"required":["id","name"],"additionalProperties":false},"template":{"type":"object","properties":{"providerId":{"type":"string"},"serviceId":{"type":"string"},"version":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["providerId","serviceId","version"],"additionalProperties":false},"applyUrl":{"type":"string","format":"uri","description":"Signed DNS-provider approval URL."}},"required":["status","checkedAt","provider","template","applyUrl"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unsupported"},"reason":{"type":"string","enum":["domain_not_bound","configuration_unsupported","discovery_not_advertised","discovery_ambiguous","settings_not_found","settings_invalid","sync_flow_unsupported","template_unsupported","provider_unavailable","signing_unavailable"]},"checkedAt":{"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))$"},"provider":{"type":"object","properties":{"id":{"type":"string","description":"DNS provider identifier returned by Domain Connect discovery."},"name":{"type":"string","description":"DNS provider name returned by Domain Connect discovery."},"displayName":{"type":"string"},"controlPanelUrl":{"type":"string","format":"uri"}},"required":["id","name"],"additionalProperties":false}},"required":["status","reason","checkedAt"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"unavailable"},"reason":{"type":"string","enum":["domain_not_bound","configuration_unsupported","discovery_not_advertised","discovery_ambiguous","settings_not_found","settings_invalid","sync_flow_unsupported","template_unsupported","provider_unavailable","signing_unavailable"]},"checkedAt":{"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))$"},"provider":{"type":"object","properties":{"id":{"type":"string","description":"DNS provider identifier returned by Domain Connect discovery."},"name":{"type":"string","description":"DNS provider name returned by Domain Connect discovery."},"displayName":{"type":"string"},"controlPanelUrl":{"type":"string","format":"uri"}},"required":["id","name"],"additionalProperties":false}},"required":["status","reason","checkedAt"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}/ssl/retry":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"retrySpaceCustomDomainSsl","summary":"Retry domain SSL","description":"Queue a durable operation to retry SSL issuance.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"requestedAt":{"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))$","description":"When the retry was accepted."}},"required":["requestedAt"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/spaces/{spaceId}/domains/{domainId}/dns/replace":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"replaceSpaceCustomDomainDnsRecords","summary":"Replace blocking DNS records","description":"Delete the team's A, AAAA, CNAME and ALIAS records that block this domain's names in its Spacefast DNS zone. Then Spacefast DNS serves those names for the Space. The deleted records are not kept, and removing the domain later does not restore them. A name that an NS delegation blocks is never replaced. Pass `names` to replace some names only. The returned operation is the domain check that writes Spacefast's records. It is null when no name was blocked. Needs `domains:dns.write` on the zone's domain.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"names":{"description":"Hostnames of this domain to replace. Omit it to replace every name that the team's A, AAAA, CNAME or ALIAS records block.","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"domain":{"type":"object","properties":{"tenantId":{"type":"string","description":"Tenant that owns this record (`ten_...`)."},"principal":{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false,"description":"Tenant-local principal that owns this domain: a team in the main tenant, an external customer in partner integrations."},"wildcardEnabled":{"type":"boolean","description":"Whether wildcard hostnames can be derived from this record."},"redirect":{"description":"Whole-host redirect target; present only on redirecting domains.","type":"object","properties":{"to":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Absolute URL to redirect to."}},"required":["url"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Space to redirect to (`spc_...`)."},"path":{"description":"Path on the target space.","type":"string","maxLength":255}},"required":["spaceId"],"additionalProperties":false}],"description":"Redirect destination: an absolute URL, or a space (optionally with a path)."},"status":{"type":"string","enum":[301,302,307,308]}},"required":["to","status"],"additionalProperties":false},"registrar":{"description":"Registration facet; present only on apex records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Registrar provider key for a Spacefast-managed registration, for example `wpcom`.","type":"string"},"status":{"description":"Registration lifecycle status; `expiring` is derived from the expiry date.","type":"string","enum":["active","pending_purchase","pending_transfer_in","expiring","expired","locked"]},"expiresAt":{"description":"Instant when the registration expires.","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))$"},"redemptionEndsAt":{"description":"Instant when the provider grace or redemption window ends after expiry.","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))$"},"autoRenew":{"description":"Whether the registration renews automatically.","type":"boolean"},"transferLock":{"description":"Whether outbound transfers are locked at the registrar.","type":"boolean"}},"required":["mode"],"additionalProperties":false},"dns":{"description":"DNS hosting facet; present only on zone-cut-owning records.","type":"object","properties":{"mode":{"type":"string","enum":["spacefast","external"],"description":"Whether Spacefast hosts the authoritative zone or an external DNS provider does."},"managementKind":{"description":"Derived DNS management state. This field is additive. `mode` remains the v1 compatibility field.","type":"string","enum":["unmanaged_external","connected_provider","spacefast_nameservers"]},"dnsMode":{"description":"Hybrid DNS mode derived from `managementKind`: authoritative when Spacefast hosts the zone, or adapter when records are managed or observed on the user's existing host. This field is an additive read-model label.","type":"string","enum":["authoritative","adapter"]},"provider":{"description":"DNS provider key for a Spacefast-hosted zone, for example `spacefast` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Nameservers the registrar should use when Spacefast hosts the zone.","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"ownershipProof":{"description":"The TXT record Spacefast DNS waits for before serving this zone. Add it at the DNS provider that answers for the domain now and keep the current nameservers until Spacefast sees it; Spacefast checks public DNS automatically. Present for Spacefast-hosted DNS; `null` when no proof is needed.","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},{"type":"null"}]},"snapshot":{"description":"Connected-provider record snapshot freshness for portfolio lists.","type":"object","properties":{"freshness":{"type":"string","enum":["fresh","stale","refresh_running","refresh_failed","never_fetched"]},"lastFetchedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"version":{"type":["string","null"]}},"required":["freshness","lastFetchedAt","version"],"additionalProperties":false},"lastOperation":{"description":"Latest DNS operation summary for portfolio and recovery surfaces.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","observing","succeeded","failed","canceled"]},"updatedAt":{"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","kind","status","updatedAt"],"additionalProperties":false}},"required":["mode"],"additionalProperties":false},"hints":{"description":"Projected domain hints derived from diagnostics, actions, observations, and operations.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"severity":{"type":"string","enum":["info","warning","error"]},"painLevel":{"type":"string","enum":["info","needs_attention","blocked","broken","dangerous"]},"subjectFacet":{"type":"string","enum":["dns_zone","registrar","hosting_binding","email","forwarding","provider_connection"]},"subjectRef":{"type":"object","properties":{"domainId":{"type":"string"},"zoneId":{"type":"string"},"bindingId":{"type":"string"},"connectionId":{"type":"string"}},"required":["domainId"],"additionalProperties":false},"owner":{"type":"string","enum":["spacefast","user","registrar","provider","support","waiting"]},"status":{"type":"string","enum":["active","waiting","running","resolved","dismissed"]},"summary":{"type":"string"},"description":{"type":"string"},"impact":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"observedAt":{"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))$"},"source":{"type":"string","enum":["provider_api","public_dns","registrar","spacefast_db","operation","user_input"]}},"required":["label","value","source"],"additionalProperties":false}},"suggestions":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"description":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"open_pending_action"},"actionId":{"type":"string"}},"required":["type","actionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"run_action"},"actionKind":{"type":"string"}},"required":["type","actionKind"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"copy_records"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}}},"required":["type","records"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refresh"},"target":{"type":"string"}},"required":["type","target"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reconnect_provider"},"connectionId":{"type":"string"}},"required":["type","connectionId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"open_external"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"wait"},"retryAfter":{"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":["type","retryAfter"],"additionalProperties":false}]},"primary":{"type":"boolean"},"destructive":{"type":"boolean"}},"required":["label","description","action"],"additionalProperties":false}},"docsUrl":{"type":"string","format":"uri"},"operationId":{"type":"string"},"requestId":{"type":"string"},"providerRequestId":{"type":"string"},"expiresAt":{"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","code","severity","painLevel","subjectFacet","subjectRef","owner","status","summary","description","impact","evidence","suggestions"],"additionalProperties":false}},"id":{"type":"string","description":"Domain attachment ID."},"spaceId":{"type":"string","description":"Space that serves this hostname."},"name":{"type":"string","description":"Canonical lowercase ASCII hostname without a trailing dot."},"unicodeName":{"description":"Unicode hostname, when different from name.","type":"string"},"kind":{"type":"string","enum":["hostname","apex"]},"derivedGroup":{"type":"string","description":"Registrable domain for this hostname."},"primary":{"type":"boolean","description":"Whether this hostname is the Space's primary URL."},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["not_required","pending","verified","failed"],"description":"Current proof of DNS control. `failed` alone never tears down compiled serving state."},"requiredRecords":{"description":"DNS records the caller must create to prove control and route traffic.","type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false}},"lastCheckedAt":{"description":"Instant when observed DNS was last polled.","anyOf":[{"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))$"},{"type":"null"}]},"lastVerifiedAt":{"description":"Instant when this domain last proved DNS control.","anyOf":[{"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))$"},{"type":"null"}]},"diagnostics":{"description":"Structured verification diagnostics with stable codes.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"additionalProperties":false,"description":"Provider status and required DNS records."},"servingRecords":{"description":"Present when Spacefast DNS holds this domain's zone. Then `verification.requiredRecords` is empty, because the team adds no records by hand.","type":"object","properties":{"source":{"type":"string","const":"spacefast_dns","description":"Spacefast DNS holds this domain's zone."},"zone":{"type":"object","properties":{"hostname":{"type":"string","description":"Zone that holds this domain's records."},"status":{"type":"string","enum":["served","awaiting_proof","not_published"],"description":"`served`: Spacefast DNS answers for the zone. `awaiting_proof`: Spacefast DNS answers after the team proves it controls the zone. `not_published`: Spacefast stores the zone's records but does not answer for the zone yet."}},"required":["hostname","status"],"additionalProperties":false},"names":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that this domain serves."},"state":{"type":"string","enum":["served","satisfied","blocked","pending","unknown"],"description":"`served`: Spacefast's records answer at this name. `satisfied`: the team's own records already point at the Space. `blocked`: the team's records point somewhere else, so Spacefast writes nothing here. `pending`: the next domain check writes Spacefast's records here. `unknown`: Spacefast does not know the Space's addresses yet, so it changes nothing here."},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","TXT","ALIAS"]},"name":{"type":"string","description":"Record name to create, relative to the zone."},"value":{"type":"string","description":"Exact record value to set."},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purpose":{"type":"string","enum":["verification","routing","ssl"],"description":"Why this record is needed."}},"required":["type","name","value","purpose"],"additionalProperties":false},"description":"Records that Spacefast keeps at this name. Empty while the name is blocked."},"blocking":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that block this name. Replace deletes A, AAAA, CNAME and ALIAS records. It never deletes an NS delegation: the team removes that record itself."}},"required":["name","state","records","blocking"],"additionalProperties":false},"description":"One entry for each hostname that this domain serves."}},"required":["source","zone","names"],"additionalProperties":false},"ownership":{"description":"Present while this Space claims a hostname attached elsewhere.","type":"object","properties":{"status":{"type":"string","enum":["verification_required","moving"]},"expiresAt":{"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))$"},"moveAvailable":{"type":"boolean"}},"required":["status","expiresAt","moveAvailable"],"additionalProperties":false},"source":{"type":"string","const":"custom","description":"Custom hostname attached to this Space."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","name","kind","derivedGroup","primary","verification","source","managed","deletable","assignable","createdAt","updatedAt"],"additionalProperties":false,"description":"The domain after the replace. A replaced name reads `pending` until the domain check writes Spacefast's records."},"replaced":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Hostname that Spacefast DNS serves next."},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"DNS record id (`rec_...`)."},"type":{"type":"string","enum":["A","AAAA","ALIAS","CAA","CNAME","MX","NS","SRV","TXT"],"description":"DNS record type."},"name":{"type":"string","description":"Record name relative to the zone. \"@\" is the zone apex."},"value":{"type":"string","description":"Record value."}},"required":["id","type","name","value"],"additionalProperties":false},"description":"The team's records that the replace deleted. Spacefast keeps no copy."}},"required":["name","records"],"additionalProperties":false},"description":"One entry for each replaced name. Empty when no name was blocked."}},"required":["domain","replaced"],"additionalProperties":false},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}],"description":"Background operation handle when asynchronous work remains after this mutation; null when it completed synchronously."}},"required":["data","operation"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Domains"]}},"/v1/publish":{"post":{"security":[{},{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:publish"]},{"oauth2":["publish:write"]}],"operationId":"createPublish","summary":"Publish files or capture a website and get a live URL","description":"Publish files, a zip/tar archive, or a public HTTPS website and get a Spacefast URL. Pass sourceUrl to capture and publish a website; URL publishing must be enabled for the caller and is mutually exclusive with files, deletions, and archive uploads. URL publishes and archives that need a build return a durable Build receipt with next.action=poll; follow links.status until publication completes. The Build's capture field reports URL capture progress and quality evidence; an unmeasured visual comparison is not a passing comparison. Use a stable Idempotency-Key when retrying the same request. Already-built files and static website archives publish directly and wait for finalization by default; pass async=1 to return an operation link to poll instead. For buildable source on a Spacefast-managed Space, the receipt's git block provides the repository remote and the Build's input.commit identifies the source commit; later git pushes continue that repository history. The Open link provides reusable access. New Spaces are Private by default. Pass spaceId to update an existing Space; otherwise a new Space is created.","responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"anyOf":[{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"publicName":{"type":"string"},"defaultHostname":{"type":"string"},"liveUrl":{"type":["string","null"]}},"required":["id","slug","title","publicName","liveUrl"],"additionalProperties":false},"build":{"type":"object","properties":{"capture":{"description":"URL capture progress and advisory evidence; absent for other inputs.","type":"object","properties":{"state":{"type":"string"},"previewSummary":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"progress":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"archiveHash":{"type":"string"}},"required":["state"],"additionalProperties":false},"id":{"type":"string","description":"Build id (`bld_`); opaque and never derived from a version id."},"spaceId":{"type":"string","description":"Space (`spc_`) the build produces a version for."},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"],"description":"Build lifecycle status."},"input":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"sourceUrl":{"type":"string","maxLength":2048,"format":"uri"}},"required":["kind","sourceUrl"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"archive","description":"Build from an uploaded source archive."}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"repository","description":"Build from repository source where clone credentials are not exposed."},"ref":{"type":"string","description":"Branch, tag, or ref to build."},"commit":{"description":"Exact commit built, once resolved.","type":"string"},"branch":{"description":"Branch name when available.","type":"string"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","ref"],"additionalProperties":false}],"description":"Public build input. Internal clone URLs and provider source references are hidden."},"source":{"default":null,"description":"Publish provenance as declared at build start (client, git ref data, publish message). Present on failed and running builds too; the produced version's `source` is the authoritative copy once one exists. Null when nothing was declared.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"settingsSnapshot":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds. production is an alias for live; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"required":["channel","preview"],"additionalProperties":false,"description":"Where a successful build should publish or run in preview mode."},"retryOfBuildId":{"default":null,"description":"Original build retried by this build.","type":["string","null"]},"producedVersionId":{"description":"Version (`ver_`) minted by a successful build; null otherwise.","type":["string","null"]},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","type":["string","null"]},"diagnostics":{"default":[],"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"startedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the runner picked the build up."},"finishedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the build reached a terminal state."}},"required":["id","spaceId","status","input","source","settingsSnapshot","target","retryOfBuildId","producedVersionId","reusedVersionId","diagnostics","createdAt","startedAt","finishedAt"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"immutableUrl":{"description":"Permanent version URL, or null while the version is still being finalized.","type":["string","null"]},"ref":{"type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"type":["string","null"]}},"required":["id","status","immutableUrl","manifestHash"],"additionalProperties":false},"activation":{"type":"object","properties":{"channel":{"anyOf":[{"type":"string","enum":["live"]},{"type":"null"}],"description":"Channel this publish targeted; null means a ready version without promotion."},"outcome":{"type":"string","enum":["activated","unpromoted","superseded","pending"],"description":"activated: the live pointer moved to this version. unpromoted: ready without promotion — either the caller passed channel null, or the live channel's promotion policy held it; `reason` says which. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"description":"The version currently serving live traffic, or null when the space has none.","type":["string","null"]},"reason":{"description":"Why the outcome is not what the caller asked for. channel_promotion_manual: the live channel's promotion policy is manual, so this publish finalized ready but unpromoted; POST promote to move the pointer.","type":"string","enum":["channel_promotion_manual"]}},"required":["channel","outcome","currentLiveVersionId"],"additionalProperties":false},"next":{"type":"object","properties":{"action":{"type":"string","enum":["done","upload","finalize","poll"],"description":"What the caller does next: `done` (stop; this request intent is settled), `upload` (PUT upload targets, then follow the finalize link), `finalize` (all bytes are present, POST `url` to commit), or `poll` (server-side work is in flight, GET `url` after `retryAfter` seconds)."},"url":{"description":"The endpoint the action applies to.","type":"string"},"retryAfter":{"description":"Polling cadence in seconds; present only when action is poll.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hint":{"type":"string","maxLength":140,"description":"One plain sentence for an agent in the middle of a loop."}},"required":["action","hint"],"additionalProperties":false},"git":{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},"access":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":16,"maxLength":512},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["url","token","expiresAt"],"additionalProperties":false},"claim":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The space key (sfc_…): the one credential for this unclaimed space. Bearer auth for publish, update, status, sharing, rotation, and the one-time continuation exchange. Returned only at creation and rotation; save it immediately."},"url":{"type":"string","format":"uri","description":"The site door: the live URL with the space key in /__/ form. Opening it exchanges the key for a private view session and lands on the site. It is the same key in URL form, so share it as carefully as the key."},"claimUrl":{"type":"string","format":"uri","description":"Claim page link in /claim# form. The fragment is the key; browsers never send it to a server and the claim page strips it before analytics. Works until expiresAt and can be opened more than once."},"expiresAt":{"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":["key","url","claimUrl","expiresAt"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"links":{"type":"object","properties":{"inspect":{"type":"string"},"build":{"type":"string"},"status":{"type":"string"},"version":{"type":"string"}},"required":["inspect","build","status"],"additionalProperties":false}},"required":["space","build","next","links"],"additionalProperties":false},{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"title":{"type":"string"},"publicName":{"type":"string"},"defaultHostname":{"type":"string"},"liveUrl":{"type":["string","null"]}},"required":["id","slug","title","publicName","liveUrl"],"additionalProperties":false},"access":{"description":"Reusable Open link for owned (team/external) publishes. Anonymous publishes get no separate access object: the space key in `claim` is the credential, and `claim.url` is the door.","type":"object","properties":{"url":{"type":"string","format":"uri"},"token":{"type":"string","minLength":16,"maxLength":512},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["url","token","expiresAt"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"immutableUrl":{"description":"Permanent version URL, or null while the version is still being finalized.","type":["string","null"]},"ref":{"type":["string","null"]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"type":["string","null"]}},"required":["id","status","immutableUrl","manifestHash"],"additionalProperties":false},"activation":{"type":"object","properties":{"channel":{"anyOf":[{"type":"string","enum":["live"]},{"type":"null"}],"description":"Channel this publish targeted; null means a ready version without promotion."},"outcome":{"type":"string","enum":["activated","unpromoted","superseded","pending"],"description":"activated: the live pointer moved to this version. unpromoted: ready without promotion — either the caller passed channel null, or the live channel's promotion policy held it; `reason` says which. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"description":"The version currently serving live traffic, or null when the space has none.","type":["string","null"]},"reason":{"description":"Why the outcome is not what the caller asked for. channel_promotion_manual: the live channel's promotion policy is manual, so this publish finalized ready but unpromoted; POST promote to move the pointer.","type":"string","enum":["channel_promotion_manual"]}},"required":["channel","outcome","currentLiveVersionId"],"additionalProperties":false},"next":{"type":"object","properties":{"action":{"type":"string","enum":["done","upload","finalize","poll"],"description":"What the caller does next: `done` (stop; this request intent is settled), `upload` (PUT upload targets, then follow the finalize link), `finalize` (all bytes are present, POST `url` to commit), or `poll` (server-side work is in flight, GET `url` after `retryAfter` seconds)."},"url":{"description":"The endpoint the action applies to.","type":"string"},"retryAfter":{"description":"Polling cadence in seconds; present only when action is poll.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"hint":{"type":"string","maxLength":140,"description":"One plain sentence for an agent in the middle of a loop."}},"required":["action","hint"],"additionalProperties":false},"git":{"description":"Git remote for this space. `managedBy: \"spacefast\"` carries a `remoteUrl` you can push to; `managedBy: \"github\"` means the space deploys from GitHub and direct pushes are refused.","type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},"authMode":{"description":"anonymous: authorized by a space key. authenticated: authorized by an account.","type":"string","enum":["anonymous","authenticated"]},"persistence":{"description":"temporary: the space expires unless claimed. managed: the space belongs to a team and persists.","type":"string","enum":["temporary","managed"]},"operation":{"description":"Background finalize operation when publish work continues asynchronously.","type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},"upload":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Upload session id (upl_…) minted by the runtime."},"mode":{"type":"string","enum":["dist","source"],"description":"`dist` bytes are publishable output. `source` bytes must be transformed, unpacked, or built before publish."},"expiresAt":{"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))$","description":"Instant when the session token expires. This rotates only the token, never the version lifecycle boundary. Resume always mints a fresh token."},"summary":{"type":"object","properties":{"upload":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files that still need uploading."},"reused":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files satisfied by hash reuse."},"ignored":{"description":"Deprecated; current servers return zero.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["upload","reused"],"additionalProperties":false,"description":"Counts for the whole manifest, independent of target paging."},"targets":{"default":[],"description":"Opaque upload targets, bounded by the instruction payload budget. Upload these, then call `links.refresh` for the remainder.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Caller-local path/key identifying the bytes this target accepts."},"method":{"type":"string","enum":["PUT","POST"],"description":"HTTP method to use for this target."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Absolute or API-relative upload URL issued by the control plane."},"headers":{"default":{},"description":"Exact headers to send with the upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"body":{"description":"Optional body recipe. Omitted means the client uploads the local bytes for `path`; `url` means POST the URL for server-side fetch.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}]},"size":{"description":"Expected byte size when known.","type":"integer","minimum":0,"maximum":9007199254740991},"maxBytes":{"description":"Maximum accepted byte size when the server can advertise it.","type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"type":"string"}},"required":["path","method","url","headers"],"additionalProperties":false}},"bulk":{"description":"Optional direct runtime transport for this page's content-addressed targets. Clients that do not support it continue with targets.","type":"object","properties":{"kind":{"type":"string","const":"zip-cas-v1"},"method":{"type":"string","const":"PUT"},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"string","pattern":"^\\/.*"}],"description":"Upload-auth runtime URL that accepts a ZIP of SHA-named CAS blobs."},"headers":{"default":{},"description":"Exact headers to send with the bulk upload request.","type":"object","propertyNames":{"type":"string","minLength":1},"additionalProperties":{"type":"string"}},"maxCompressedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxExpandedBytes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"maxBlobs":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","method","url","headers","maxCompressedBytes","maxExpandedBytes","maxBlobs"],"additionalProperties":false},"links":{"type":"object","properties":{"refresh":{"type":"string"},"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["refresh","finalize"],"additionalProperties":false},"details":{"type":"object","properties":{"reused":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"reason":{"type":"string"}},"required":["path","reason"],"additionalProperties":false}},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}}},"additionalProperties":false}},"required":["id","mode","expiresAt","summary","targets","links"],"additionalProperties":false},"claim":{"type":"object","properties":{"key":{"type":"string","minLength":1},"url":{"type":"string","minLength":1},"claimUrl":{"type":"string","minLength":1},"expiresAt":{"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":["key","url","claimUrl","expiresAt"],"additionalProperties":false},"diagnostics":{"description":"Publish diagnostics. `noop_publish` means the content did not change. `hostname_attach_pending` means the first live version can serve before the space hostname serves. The live URL can take a few minutes to start serving. Other codes report manifest warnings or serving configuration.","type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"links":{"description":"Follow-up links so agents can act on the receipt without knowing the full API.","type":"object","properties":{"refresh":{"description":"Upload-instruction refresh endpoint; present while bytes still need uploading.","type":"string"},"resume":{"description":"Deprecated alias for `refresh`; carries the identical URL.","type":"string"},"finalize":{"description":"Finalize endpoint; present while bytes still need uploading.","type":"string"},"promote":{"description":"Promote endpoint; followable once the version reaches status \"ready\".","type":"string"},"operation":{"description":"Operation polling endpoint when publish queued.","type":"string"},"inspect":{"description":"Space resource URL for follow-up reads.","type":"string"},"version":{"description":"Version resource URL for structured clients.","type":"string"},"status":{"description":"Space-key-authenticated anonymous publish status endpoint.","type":"string"}},"additionalProperties":false}},"required":["space","version","activation","next"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false},"example":{"data":{"space":{"id":"spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","slug":"marketing-site","publicName":"marketing-site","defaultHostname":"marketing-site.space.fast","liveUrl":"https://marketing-site.space.fast/"},"version":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"status":"ready","immutableUrl":"https://marketing-site--v1.space.fast/","manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"access":{"url":"https://marketing-site.space.fast/__/example-access-token","token":"example-access-token","expiresAt":"2026-07-07T12:00:00.000Z"},"claim":{"token":"sfc_A1b2C3d4E5f6G7h8I9j0K1","url":"https://my.spacefast.com/claim#sfc_A1b2C3d4E5f6G7h8I9j0K1","expiresAt":"2026-07-07T12:00:00.000Z"},"links":{"inspect":"/v1/spaces/spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c","status":"/v1/claim/status?versionId=ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","promote":"/v1/spaces/spc_4a7f9c2e8b1d0a6f5c3e9d2b7a1f8e4c/versions/ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c/promote"}}}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Publishing"],"requestBody":{"required":true,"description":"The publish payload. Send one of: a JSON body with an already-built file manifest and metadata, a multipart form with files or one project archive, a raw project archive body, or a raw single-file body.","content":{"application/json":{"schema":{"type":"object","properties":{"spaceId":{"type":"string","minLength":1},"teamId":{"type":["string","null"]},"principal":{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Owning principal kind."},"id":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[^\\s/\\\\]+$","description":"Tenant-local principal id: a team id or an integrator external customer id."}},"required":["type","id"]},"sourceUrl":{"description":"Capture a public HTTPS website as portable HTML; mutually exclusive with files.","type":"string","maxLength":2048,"format":"uri"},"files":{"description":"Desired file manifest for a declared publish session. `sha256` is optional: omitted local bytes receive path-addressed upload targets and are hashed by the runtime; declared hashes receive content-addressed targets and can reuse existing bytes. Clients upload returned targets, then finalize.","type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Version-relative POSIX path. Canonicalized at intake to UTF-8 NFC, percent-decoded exactly once; max 1,024 bytes in canonical form."},"size":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes."},"sha256":{"description":"Optional SHA-256 content digest, 64 lowercase hex characters without the `sha256:` prefix. Omit it to let the runtime hash uploaded bytes; include it to upload by content address, with the digest verified as the bytes land.","type":"string","pattern":"^[0-9a-f]{64}$"},"contentType":{"description":"Optional content type for serving metadata.","type":"string"},"sourceUrl":{"description":"Optional HTTPS URL the runtime can fetch directly for this file instead of receiving bytes from the client.","type":"string","format":"uri"}},"required":["path","size"]}},"deletePaths":{"default":[],"description":"Explicit paths to remove when `publishMode` is additive. Omitted paths are retained. Only listed paths are deleted.","type":"array","items":{"type":"string","minLength":1}},"immutableAssetPrefixes":{"description":"Publisher-owned directory prefixes whose declared files are immutable generation assets. Snapshot publishes retain the matching files from the current generation for exactly one subsequent generation.","type":"array","items":{"type":"string","minLength":2}},"source":{"description":"Publish provenance recorded on the version; defaults to {kind: \"direct_upload\"}.","type":"object","properties":{"kind":{"type":"string","enum":["direct_upload","cli","dashboard","api","git","import","agent","build","variable_update","config_update"],"description":"How this version was produced."},"client":{"description":"Publishing client attribution, for example `spacefast-cli/1.2.3`.","type":"string","maxLength":255},"branch":{"description":"Git branch the publish came from.","type":"string","maxLength":255},"commit":{"description":"Git commit SHA the publish came from.","type":"string","maxLength":64},"message":{"description":"Plain-language description of the publish (the version changelog entry, commit message, or release note). This is THE spelling for the publish description; the version files-diff API is the fallback when none is given.","type":"string","maxLength":2000},"dirty":{"description":"Whether the working tree had uncommitted changes at publish time.","type":"boolean"},"metadata":{"description":"Additional provenance (repository, CI run URL, workflow, actor, ...).","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"git":{"type":"object","properties":{"repository":{"type":["string","null"]},"repositoryFullName":{"type":["string","null"]},"repositoryUrl":{"type":["string","null"]},"ref":{"type":["string","null"]},"branch":{"type":["string","null"]},"branchAliasUrl":{"type":["string","null"]},"commit":{"type":["string","null"]},"commitSha":{"type":["string","null"]},"pullRequestNumber":{"type":["number","null"]}},"additionalProperties":{}}},"required":["kind"]},"sourceMetadata":{"description":"Additional control-plane-only provenance for build/deploy read models.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"buildLog":{"description":"Bounded build transcript for deploys that ran a local build before publishing.","type":"string","maxLength":524288},"publishMode":{"default":"additive","description":"How to interpret omitted paths in `files`: `additive` retains existing paths unless explicitly replaced; `snapshot` treats `files` as the complete desired manifest.","type":"string","enum":["additive","snapshot"]},"email":{"description":"Optional expiry-reminder address for anonymous publishes. The server stores it only until the space is claimed or expires, then deletes it. It is never logged.","type":"string","maxLength":320,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"channel":{"description":"Omit for live publish, use production as an alias for live, or pass null to create a ready version without promotion.","anyOf":[{"type":"string","enum":["live","production"]},{"type":"null"}]},"space":{"type":"object","properties":{"slug":{"type":"string","minLength":2,"maxLength":55},"title":{"type":"string","minLength":1,"maxLength":255},"dataLocation":{"description":"Data location for a new Space; \"auto\" lets placement decide.","type":"string"}}},"config":{"description":"SpaceConfig overlay to store on the space.","type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"]}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}}},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}}},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}}},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"]}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId"]}}}},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}}}}},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}}},"access":{"description":"Set the initial root access for this new team-owned Space. Omit this field to use the team's default. Do not set this field with spaceId. `public` returns 403 `team_private_spaces_only` when the team allows private spaces only.","type":"string","enum":["private","team","public"]}}},"example":{"files":[{"path":"index.html","size":2048,"sha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","contentType":"text/html"},{"path":"styles.css","size":512,"sha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"}],"source":{"kind":"direct_upload","client":"spacefast-cli/1.4.0","message":"Initial launch"}}},"multipart/form-data":{"example":{"index.html":"\nLaunch\n

Hello from Spacefast

\n","payload":"{\"source\":{\"kind\":\"direct_upload\",\"message\":\"Initial launch\"}}"},"schema":{"type":"object","description":"Form-data publish. Send one binary part per already-built file, or one `archive` part containing a zip, tar, or tar.gz project. Project archives become durable Spacefast CI builds; file archives are packed unchanged while detected applications are built with the Spacefast CLI. Optionally send a `payload` JSON part with publish metadata (accepted aliases: `publish`, `metadata`).","properties":{"payload":{"type":"string","description":"Publish metadata as a JSON-encoded string. It has the same shape as the `application/json` body."},"archive":{"type":"string","format":"binary","description":"Optional project archive (zip, tar, or tar.gz). The server normalizes it, queues a durable Spacefast CI build, and returns a poll continuation."}},"additionalProperties":{"type":"string","format":"binary","description":"One file part per file; the field name or filename becomes the published path."}}},"text/html":{"schema":{"type":"string","description":"A single HTML document, published as `index.html`."}},"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Raw bytes for a single file. The published path comes from the `x-spacefast-path` header; when the header is absent, it defaults to the detected name."}},"application/zip":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}},"application/x-zip-compressed":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}},"application/x-tar":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}},"application/gzip":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}},"application/x-gzip":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}},"application/x-gtar":{"schema":{"type":"string","format":"binary","description":"Raw project archive bytes (zip, tar, or tar.gz). The server normalizes them, queues a durable Spacefast CI build, and returns a poll continuation."}}}},"parameters":[{"name":"async","in":"query","required":false,"description":"Controls the finalize transport. Omit the parameter, or pass `0` or `false`, to wait for the finalize and return the terminal receipt, degrading to a poll receipt only at the in-request ceiling. Pass `1` or `true` to return immediately with the operation to poll. Project archives always return a durable Build receipt and poll URL instead of holding the request open.","schema":{"type":"string","enum":["1","true","0","false"],"default":"0"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-generated key, at most 255 characters, that makes this write safe to retry. The first request with a given key stores its outcome, scoped to your tenant, credential, and route. A retry with the same key and an identical body does not execute again: the server replays the stored response and marks it `Idempotency-Replayed: true`. A credential-free publish request that sends this header must also send X-Spacefast-Idempotency-Principal. A request that reuses a key with a different body fails with 409 `idempotency_key_reused`. A duplicate request that arrives while the first is still in flight fails with 409 `idempotency_conflict_in_progress`. The server keeps each key for 24 hours.","schema":{"type":"string","maxLength":255}},{"name":"X-Spacefast-Idempotency-Principal","in":"header","required":false,"description":"Required with Idempotency-Key on a credential-free publish. Send a stable 64-character hexadecimal value that only the caller knows, and send it unchanged on every retry. It isolates the stored one-time claim and upload credentials from other anonymous callers. Never log or share this value.","schema":{"type":"string","pattern":"^[0-9A-Fa-f]{64}$"}}]}},"/v1/spaces/{spaceId}/source/availability":{"get":{"operationId":"getSpaceSourceAvailability","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Read source availability","description":"Returns whether the current repository permits independent forks of its main branch, the remix URL, and whether the live website shows a Remix button. Website access is independent.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"remixUrl":{"type":["string","null"]},"remixButton":{"type":"boolean","description":"True when the live website shows a Remix button. The source must be available and the owner must turn on the button."},"repositoryId":{"type":["string","null"]},"branch":{"type":"string","const":"main"}},"required":["enabled","remixUrl","remixButton","repositoryId","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"put":{"operationId":"setSpaceSourceAvailability","security":[{"bearerAuth":[]},{"oauth2":["spaces:access.write","spaces:read"]}],"summary":"Set source availability","description":"Allow independent forks of the current repository’s main branch, and show or hide a Remix button on the live website. Sharing does not change website access. Repository replacement and ownership transfer require fresh consent.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Allow independent forks of this repository's main branch. Website access is independent."},"remixButton":{"description":"Show a Remix button on the live website when the source is available. If you do not send this field, the value does not change.","type":"boolean"}},"required":["enabled"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Allow independent forks of this repository's main branch. Website access is independent."},"remixButton":{"description":"Show a Remix button on the live website when the source is available. If you do not send this field, the value does not change.","type":"boolean"}},"required":["enabled"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Allow independent forks of this repository's main branch. Website access is independent."},"remixButton":{"description":"Show a Remix button on the live website when the source is available. If you do not send this field, the value does not change.","type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"enabled":{"type":"boolean"},"remixUrl":{"type":["string","null"]},"remixButton":{"type":"boolean","description":"True when the live website shows a Remix button. The source must be available and the owner must turn on the button."},"repositoryId":{"type":["string","null"]},"branch":{"type":"string","const":"main"}},"required":["enabled","remixUrl","remixButton","repositoryId","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/repository-connections/installations":{"get":{"operationId":"listGithubInstallations","security":[{"sessionCookie":[]}],"summary":"List GitHub App installations","description":"Returns the team's GitHub App installations and a signed link that installs the app for more accounts or repositories.","parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Team whose GitHub App installations to read. Required unless the deprecated `spaceId` is sent.","type":"string","minLength":1}},{"name":"returnSpaceId","in":"query","required":false,"schema":{"description":"A Space in that team to come back to after a new install: the returned `installUrl` lands on its Builds page. Omit it to land on the team's New space screen.","type":"string","minLength":1}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Deprecated. Use `teamId`. A Space whose team to read; it also acts as the return Space.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"readiness":{"type":"object","properties":{"canAuthorize":{"type":"boolean"},"canInstall":{"type":"boolean"},"webhookReady":{"type":"boolean"},"codeStorageReady":{"type":"boolean"},"ready":{"type":"boolean"}},"required":["canAuthorize","canInstall","webhookReady","codeStorageReady","ready"],"additionalProperties":false},"installUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"installations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"accountLogin":{"type":"string"},"accountType":{"type":["string","null"]},"htmlUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["id","accountLogin","accountType","htmlUrl"],"additionalProperties":false}}},"required":["readiness","installUrl","installations"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/repository-connections/installations/{installationId}/repositories":{"get":{"operationId":"listGithubInstallationRepositories","security":[{"sessionCookie":[]}],"summary":"List installation repositories","description":"Returns the repositories the team may connect through one GitHub App installation, most recently pushed first.","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","required":false,"schema":{"description":"Team the installation is connected to. Required unless the deprecated `spaceId` is sent.","type":"string","minLength":1}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Deprecated. Use `teamId`. A Space whose team to read; it also acts as the return Space.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fullName":{"type":"string"},"defaultBranch":{"type":"string"},"cloneUrl":{"type":"string"},"private":{"type":"boolean"},"pushedAt":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}],"description":"When the repository last received a push, read live from GitHub. Null when GitHub could not be reached; the list then falls back to name order."}},"required":["id","name","fullName","defaultBranch","cloneUrl","private","pushedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/connection":{"post":{"operationId":"createSpaceSourceConnection","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create a source connection","description":"Creates a source connection. It replaces an existing connection only after you close its source workspaces.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"default":"github","type":"string","enum":["github","gitlab","bitbucket","generic"]},"connectionType":{"default":"connected","type":"string","enum":["connected","hosted"]},"repositoryId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryName":{"type":"string","minLength":1},"repositoryFullName":{"type":"string","minLength":1},"defaultBranch":{"default":"main","type":"string","minLength":1},"productionBranch":{"type":"string","minLength":1},"installationId":{"description":"Repository app installation id.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"default":true,"type":"boolean"},"autoDeployPreviews":{"default":true,"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"default":"github","type":"string","enum":["github","gitlab","bitbucket","generic"]},"connectionType":{"default":"connected","type":"string","enum":["connected","hosted"]},"repositoryId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryName":{"type":"string","minLength":1},"repositoryFullName":{"type":"string","minLength":1},"defaultBranch":{"default":"main","type":"string","minLength":1},"productionBranch":{"type":"string","minLength":1},"installationId":{"description":"Repository app installation id.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"default":true,"type":"boolean"},"autoDeployPreviews":{"default":true,"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"default":"github","type":"string","enum":["github","gitlab","bitbucket","generic"]},"connectionType":{"default":"connected","type":"string","enum":["connected","hosted"]},"repositoryId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"repositoryName":{"type":"string","minLength":1},"repositoryFullName":{"type":"string","minLength":1},"defaultBranch":{"default":"main","type":"string","minLength":1},"productionBranch":{"type":"string","minLength":1},"installationId":{"description":"Repository app installation id.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"default":true,"type":"boolean"},"autoDeployPreviews":{"default":true,"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"get":{"operationId":"getSpaceSourceConnection","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get a source connection","description":"Returns the source connection for a space and connection type.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"patch":{"operationId":"updateSpaceSourceConnection","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Update a source connection","description":"Updates build defaults, branch behavior, and repository URLs. Close open source workspaces before you change repository URLs.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"productionBranch":{"type":"string","minLength":1},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"productionBranch":{"type":"string","minLength":1},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"productionBranch":{"type":"string","minLength":1},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"description":"Sparse per-request build setting overrides applied over saved settings."}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"delete":{"operationId":"deleteSpaceSourceConnection","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Delete a source connection","description":"Deletes one source connection and stops future repository builds. Close its source workspaces before deletion.","responses":{"204":{"description":"The source connection was deleted."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"tags":["Git"]}},"/v1/spaces/{spaceId}/source/connection/webhook-deliveries":{"get":{"operationId":"listSpaceSourceWebhookDeliveries","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List repository webhook deliveries","description":"Returns repository webhook delivery status for a space without exposing raw payloads.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"connectionType","in":"query","required":false,"schema":{"description":"Return only deliveries for this connection type.","type":"string","enum":["connected","hosted"]}},{"name":"status","in":"query","required":false,"schema":{"description":"Return only deliveries in this processing state.","type":"string","enum":["received","processing","processed","ignored","failed"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"string","description":"Webhook receiver that accepted the repository event."},"deliveryId":{"type":"string","description":"Stable delivery id from the repository event source."},"repositoryConnectionId":{"type":["string","null"]},"matchedConnectionIds":{"default":[],"type":"array","items":{"type":"string"}},"repositoryId":{"type":["string","null"]},"eventName":{"type":"string"},"ref":{"type":["string","null"]},"commit":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"status":{"type":"string","enum":["received","processing","processed","ignored","failed"]},"statusMessage":{"type":["string","null"]},"queuedBuildIds":{"type":"array","items":{"type":"string"}},"retiredVersionIds":{"default":[],"type":"array","items":{"type":"string"}},"rawBodySha256":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","receiver","deliveryId","repositoryConnectionId","matchedConnectionIds","repositoryId","eventName","ref","commit","syncRunId","status","statusMessage","queuedBuildIds","retiredVersionIds","rawBodySha256","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/connection/webhook-deliveries/{deliveryId}":{"get":{"operationId":"getSpaceSourceWebhookDelivery","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get a repository webhook delivery","description":"Returns one repository webhook delivery status without exposing the raw payload.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"string","description":"Webhook receiver that accepted the repository event."},"deliveryId":{"type":"string","description":"Stable delivery id from the repository event source."},"repositoryConnectionId":{"type":["string","null"]},"matchedConnectionIds":{"default":[],"type":"array","items":{"type":"string"}},"repositoryId":{"type":["string","null"]},"eventName":{"type":"string"},"ref":{"type":["string","null"]},"commit":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"status":{"type":"string","enum":["received","processing","processed","ignored","failed"]},"statusMessage":{"type":["string","null"]},"queuedBuildIds":{"type":"array","items":{"type":"string"}},"retiredVersionIds":{"default":[],"type":"array","items":{"type":"string"}},"rawBodySha256":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","receiver","deliveryId","repositoryConnectionId","matchedConnectionIds","repositoryId","eventName","ref","commit","syncRunId","status","statusMessage","queuedBuildIds","retiredVersionIds","rawBodySha256","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/connection/analyze":{"post":{"x-spacefast-read-only":true,"operationId":"analyzeSpaceSourceConnection","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Analyze a source connection","description":"Detects framework settings and unsupported platform configuration for a source connection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"detected":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"detectedFiles":{"type":"array","items":{"type":"string"}},"candidates":{"default":[],"type":"array","items":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200},"workingDirectory":{"type":"string"},"confidence":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasons":{"type":"array","items":{"type":"string"}},"detectedFiles":{"type":"array","items":{"type":"string"}}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds","workingDirectory","confidence","reasons","detectedFiles"],"additionalProperties":false}},"platformConfigs":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["vercel","netlify","cloudflare-pages"]},"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"unsupportedFeatures":{"type":"array","items":{"type":"string"}}},"required":["platform","rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","unsupportedFeatures"],"additionalProperties":false}},"unsupportedFeatures":{"type":"array","items":{"type":"string"}},"blocked":{"type":"boolean"},"message":{"type":["string","null"]}},"required":["detected","detectedFiles","candidates","platformConfigs","unsupportedFeatures","blocked","message"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/push-remote":{"post":{"operationId":"createSpaceSourcePushRemote","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Get a repository push remote","description":"Returns a signed Git remote for pushing project files to the source connection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":31536000},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":31536000},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":31536000},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"remote":{"type":"object","properties":{"cloneUrl":{"type":"string"},"pushUrl":{"type":"string"},"expiresInSeconds":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"readOnlyRefs":{"type":"array","items":{"type":"string"}}},"required":["cloneUrl","pushUrl","expiresInSeconds","readOnlyRefs"],"additionalProperties":false}},"required":["repositoryConnection","remote"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/import-remote":{"post":{"operationId":"createSpaceSourceImportRemote","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get a repository import remote","description":"Returns a signed Git remote for one-time repository ingestion without enabling automatic builds.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"remote":{"type":"object","properties":{"repositoryId":{"type":"string"},"pushUrl":{"type":"string"},"expiresInSeconds":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"readOnlyRefs":{"type":"array","items":{"type":"string"}}},"required":["repositoryId","pushUrl","expiresInSeconds","readOnlyRefs"],"additionalProperties":false}},"required":["repositoryConnection","remote"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/files":{"get":{"operationId":"listSpaceSourceFiles","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List source files","description":"List source files and folders at a branch, tag, or commit SHA. This does not list deployed build output.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"description":"Branch, tag, or commit SHA to read. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"path","in":"query","required":false,"schema":{"description":"Directory to list, relative to the repository root. Defaults to the root.","type":"string","minLength":1}},{"name":"recursive","in":"query","required":false,"schema":{"description":"List every nested entry instead of only the immediate children.","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":250,"description":"Maximum entries to return.","type":"integer","exclusiveMinimum":0,"maximum":1000}},{"name":"metadata","in":"query","required":false,"schema":{"description":"Include each entry's size, mode, and last commit.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"ref":{"type":"string"},"entries":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["blob","tree","symlink","submodule"]},"mode":{"type":["string","null"]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastCommitSha":{"type":["string","null"]},"lastCommit":{"anyOf":[{"type":"object","properties":{"author":{"type":"string"},"date":{"type":"string"},"message":{"type":"string"}},"required":["author","date","message"],"additionalProperties":false},{"type":"null"}]}},"required":["path","type"],"additionalProperties":false}}},"required":["repositoryConnection","ref","entries"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/file":{"get":{"operationId":"getSpaceSourceFile","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Read a source file","description":"Read one source file at a branch, tag, or commit SHA. Use head for metadata without file contents.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"description":"Branch, tag, or commit SHA to read. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."}},{"name":"head","in":"query","required":false,"schema":{"description":"Return the file's metadata only, with `content` null.","type":"string"}},{"name":"maxBytes","in":"query","required":false,"schema":{"default":65536,"description":"Maximum file content to read. The limit is 1 MiB.","type":"integer","exclusiveMinimum":0,"maximum":1048576}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"ref":{"type":"string"},"path":{"type":"string"},"content":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"blobSha":{"type":["string","null"]},"lastCommitSha":{"type":["string","null"]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"etag":{"type":["string","null"]},"lastModified":{"type":["string","null"]},"contentType":{"type":["string","null"]}},"required":["status","blobSha","lastCommitSha","size","etag","lastModified","contentType"],"additionalProperties":false},{"type":"null"}]}},"required":["repositoryConnection","ref","path","content","metadata"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/search":{"get":{"operationId":"searchSpaceSourceFiles","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Search source files","description":"Search source text at a branch, tag, or commit SHA. The response includes the resolved commit and a pagination cursor.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"description":"Branch, tag, or commit SHA to read. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"pattern","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Regular expression to search file contents for."}},{"name":"caseSensitive","in":"query","required":false,"schema":{"description":"Match the pattern case-sensitively. Defaults to case-insensitive.","type":"string"}},{"name":"path","in":"query","required":false,"schema":{"description":"Limit the search to these paths, relative to the repository root. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"includeGlob","in":"query","required":false,"schema":{"description":"Search only files matching these globs. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"excludeGlob","in":"query","required":false,"schema":{"description":"Skip files matching these globs. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"extension","in":"query","required":false,"schema":{"description":"Search only files with these extensions, without the leading dot. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"contextBefore","in":"query","required":false,"schema":{"description":"Lines of context to return before each match.","type":"integer","minimum":0,"maximum":20}},{"name":"contextAfter","in":"query","required":false,"schema":{"description":"Lines of context to return after each match.","type":"integer","minimum":0,"maximum":20}},{"name":"maxLines","in":"query","required":false,"schema":{"description":"Ceiling on total lines returned across all matches.","type":"integer","exclusiveMinimum":0,"maximum":1000}},{"name":"maxMatchesPerFile","in":"query","required":false,"schema":{"description":"Ceiling on matches returned per file.","type":"integer","exclusiveMinimum":0,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"description":"Maximum matching files to return.","type":"integer","exclusiveMinimum":0,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"ref":{"type":"string"},"commit":{"type":"string"},"pattern":{"type":"string"},"caseSensitive":{"type":"boolean"},"matches":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"},"type":{"type":"string"}},"required":["lineNumber","text","type"],"additionalProperties":false}}},"required":["path","lines"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["repositoryConnection","ref","commit","pattern","caseSensitive","matches","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/diff":{"get":{"operationId":"getSpaceSourceDiff","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Compare source branches","description":"Compare one source branch with another branch. The default branch is the base if you do not set `base`.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"branch","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Branch to diff."}},{"name":"base","in":"query","required":false,"schema":{"description":"Branch to diff against. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"ephemeral","in":"query","required":false,"schema":{"description":"Resolve `branch` as a short-lived branch from `POST /v1/spaces/{spaceId}/source/ephemeral-branch` rather than an ordinary one.","type":"string"}},{"name":"ephemeralBase","in":"query","required":false,"schema":{"description":"Resolve `base` as a short-lived branch rather than an ordinary one.","type":"string"}},{"name":"path","in":"query","required":false,"schema":{"description":"Limit the diff to these paths, relative to the repository root. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"patch","in":"query","required":false,"schema":{"description":"Include each file's unified-diff patch text.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"branch":{"type":"string"},"base":{"type":"string"},"stats":{"type":"object","properties":{"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["files","additions","deletions","changes"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"oldPath":{"type":["string","null"]},"state":{"type":"string"},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"patch":{"description":"Unified-diff patch text for the file. Null unless `patch` was requested.","type":["string","null"]}},"required":["path","oldPath","state","additions","deletions","changes","patch"],"additionalProperties":false}}},"required":["repositoryConnection","repositoryId","branch","base","stats","files"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/commit-diff":{"get":{"operationId":"getSpaceSourceCommitDiff","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Compare source commits","description":"Compare one source commit with another source commit. The first parent is the default base. Set `maxPatchBytes` to limit the total patch text.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"sha","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Commit to compare. This commit is the new side of the comparison."}},{"name":"baseSha","in":"query","required":false,"schema":{"description":"Base commit to compare. The first parent is the default.","type":"string","minLength":1}},{"name":"path","in":"query","required":false,"schema":{"description":"Limit the diff to these paths, relative to the repository root. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"patch","in":"query","required":false,"schema":{"description":"Include each file's unified-diff patch text.","type":"string"}},{"name":"savedOnly","in":"query","required":false,"schema":{"description":"Require each commit to exist in the saved history of `branch`.","type":"string"}},{"name":"branch","in":"query","required":false,"schema":{"description":"Branch whose saved history contains the commits. The production branch is the default.","type":"string","minLength":1}},{"name":"maxPatchBytes","in":"query","required":false,"schema":{"default":65536,"description":"Maximum total UTF-8 bytes for patch text. The response marks truncated patches.","type":"integer","exclusiveMinimum":0,"maximum":262144}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"sha":{"type":"string"},"baseSha":{"type":["string","null"]},"stats":{"type":"object","properties":{"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["files","additions","deletions","changes"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"oldPath":{"type":["string","null"]},"state":{"type":"string"},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"patch":{"description":"Unified-diff patch text for the file. Null unless `patch` was requested.","type":["string","null"]},"patchTruncated":{"type":"boolean","description":"True when the patch text was truncated."}},"required":["path","oldPath","state","additions","deletions","changes","patch","patchTruncated"],"additionalProperties":false}},"filteredFiles":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"oldPath":{"type":["string","null"]},"state":{"type":"string"}},"required":["path","oldPath","state"],"additionalProperties":false},"description":"Files the provider left out of the diff body, so truncation is visible."}},"required":["repositoryConnection","repositoryId","sha","baseSha","stats","files","filteredFiles"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/branches":{"get":{"operationId":"listSpaceSourceBranches","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List repository branches","description":"Returns branches and their head commits from a synced source connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum branches to return.","type":"integer","exclusiveMinimum":0,"maximum":100}},{"name":"ephemeral","in":"query","required":false,"schema":{"description":"List short-lived branches instead of ordinary ones.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"branches":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"headSha":{"type":"string"},"createdAt":{"type":["string","null"]}},"required":["name","headSha","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","branches","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"post":{"operationId":"createSpaceSourceBranch","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create a repository branch","description":"Creates a durable repository branch. For short-lived preview branches, use the ephemeral-branch operation instead.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1},"baseRef":{"description":"Branch, tag, or commit the new branch starts from. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["connectionType","branch"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1},"baseRef":{"description":"Branch, tag, or commit the new branch starts from. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["connectionType","branch"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1},"baseRef":{"description":"Branch, tag, or commit the new branch starts from. Defaults to the repository's default branch.","type":"string","minLength":1}},"required":["connectionType","branch"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"branch":{"type":"object","properties":{"name":{"type":"string"},"commitSha":{"type":"string"},"message":{"type":"string"}},"required":["name","commitSha","message"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"delete":{"operationId":"deleteSpaceSourceBranch","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Delete a repository branch","description":"Deletes a durable repository branch.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1}},"required":["connectionType","branch"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1}},"required":["connectionType","branch"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"branch":{"type":"string","minLength":1}},"required":["connectionType","branch"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"branch":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/blame":{"get":{"operationId":"getSpaceSourceBlame","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get file blame","description":"Returns per-line commit attribution for one file at a ref, without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."}},{"name":"ref","in":"query","required":false,"schema":{"description":"Branch, tag, or commit SHA to read. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"range","in":"query","required":false,"schema":{"description":"Line range to blame, as `start-end`. Repeat the parameter to pass more than one. Defaults to the whole file.","anyOf":[{"type":"string","pattern":"^\\d+-\\d+$"},{"type":"array","items":{"type":"string","pattern":"^\\d+-\\d+$"}}]}},{"name":"detectMoves","in":"query","required":false,"schema":{"description":"Attribute lines moved within the repository to their original commits.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"ref":{"type":"string"},"path":{"type":"string"},"commitSha":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"commitSha":{"type":"string"},"originalLineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"originalPath":{"type":"string"},"previousCommitSha":{"type":["string","null"]},"authorName":{"type":"string"},"authorEmail":{"type":"string"},"authorTime":{"type":"string"},"committerName":{"type":"string"},"committerEmail":{"type":"string"},"committerTime":{"type":"string"},"summary":{"type":"string"}},"required":["lineNumber","commitSha","originalLineNumber","originalPath","previousCommitSha","authorName","authorEmail","authorTime","committerName","committerEmail","committerTime","summary"],"additionalProperties":false}}},"required":["repositoryConnection","repositoryId","ref","path","commitSha","lines"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/archive":{"get":{"operationId":"downloadSpaceSourceArchive","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Download a repository archive","description":"Downloads a repository archive from a synced source connection without requiring a signed Git remote.","responses":{"200":{"description":"A gzip-compressed tar archive of the repository.","content":{"application/gzip":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"description":"Branch, tag, or commit SHA to read. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"includeGlob","in":"query","required":false,"schema":{"description":"Archive only files matching these globs. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"excludeGlob","in":"query","required":false,"schema":{"description":"Leave files matching these globs out of the archive. Repeat the parameter to pass more than one.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"maxBlobSize","in":"query","required":false,"schema":{"description":"Skip files larger than this many bytes.","type":"integer","exclusiveMinimum":0,"maximum":104857600}},{"name":"archivePrefix","in":"query","required":false,"schema":{"description":"Directory name every archived path is nested under.","type":"string","minLength":1}}],"tags":["Git"]}},"/v1/spaces/{spaceId}/source/tags":{"get":{"operationId":"listSpaceSourceTags","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List repository tags","description":"Returns release tags from a synced source connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum tags to return.","type":"integer","exclusiveMinimum":0,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"sha":{"type":"string"}},"required":["name","sha"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","tags","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"post":{"operationId":"createSpaceSourceTag","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create a source tag","description":"Create a release tag in a ready source connection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1}},"required":["connectionType","name","target"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1}},"required":["connectionType","name","target"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1},"target":{"type":"string","minLength":1}},"required":["connectionType","name","target"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"tag":{"type":"object","properties":{"name":{"type":"string"},"sha":{"type":"string"},"message":{"type":"string"}},"required":["name","sha","message"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","tag"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"delete":{"operationId":"deleteSpaceSourceTag","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Delete a repository tag","description":"Deletes a release tag from a ready source connection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1}},"required":["connectionType","name"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1}},"required":["connectionType","name"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"name":{"type":"string","minLength":1}},"required":["connectionType","name"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"tag":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"}},"required":["name","message"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","tag"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/commits":{"get":{"operationId":"listSpaceSourceCommits","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List source commits","description":"Read source commit history for a branch. Each commit includes parentShas in Git order. Use the newest commit SHA as expectedHeadSha when you edit that branch.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"branch","in":"query","required":false,"schema":{"description":"Branch to read history from. Defaults to the repository's default branch.","type":"string","minLength":1}},{"name":"path","in":"query","required":false,"schema":{"description":"Return only commits that touched this path.","type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"description":"Maximum commits to return.","type":"integer","exclusiveMinimum":0,"maximum":100}},{"name":"ephemeral","in":"query","required":false,"schema":{"description":"Resolve `branch` as a short-lived branch from `POST /v1/spaces/{spaceId}/source/ephemeral-branch` rather than an ordinary one.","type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"commits":{"type":"array","items":{"type":"object","properties":{"sha":{"type":"string"},"parentShas":{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{40}$"},"description":"Parent commit SHAs in Git order. The array is empty for a root commit."},"message":{"type":"string"},"authorName":{"type":"string"},"authorEmail":{"type":"string"},"committerName":{"type":"string"},"committerEmail":{"type":"string"},"date":{"type":"string"},"signature":{"description":"Armored commit signature. Only populated when reading one commit.","type":["string","null"]}},"required":["sha","parentShas","message","authorName","authorEmail","committerName","committerEmail","date","signature"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","commits","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"post":{"operationId":"createSpaceSourceCommit","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create a repository commit","description":"Save file operations as one Git commit. Spacefast creates a missing hosted repository for an initial commit. Send expectedHeadSha to reject stale writes. With sourceVersionId, preserve all original upload files before applying operations. The version must be current, ready, and a direct static upload. This option requires versions:read and versions:download in addition to spaces:write. Use 40 zeroes for expectedHeadSha and omit base or ephemeral branches. The hosted repository must have no branches, ephemeral branches, or tags. Upload bytes and replacement contents must total at most 4 MiB, with at most 1,000 uploaded files. A commit does not confirm deployment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."},"contents":{"type":"string","maxLength":1048576,"description":"Complete replacement contents. Maximum 1 MiB in the request encoding. Omitted files do not change."},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."}},"required":["action","path"]}]},"description":"File operations to save together in one Git commit. Maximum 100 paths and 4 MiB of combined contents."},"expectedHeadSha":{"description":"Commit SHA the caller read from the target branch. The write fails if the branch changed.","type":"string","minLength":1},"sourceVersionId":{"description":"Initialize hosted source from this original static upload before applying operations. Requires a zero expectedHeadSha and version read/download permissions.","type":"string","minLength":1,"maxLength":64},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","operations"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."},"contents":{"type":"string","maxLength":1048576,"description":"Complete replacement contents. Maximum 1 MiB in the request encoding. Omitted files do not change."},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."}},"required":["action","path"]}]},"description":"File operations to save together in one Git commit. Maximum 100 paths and 4 MiB of combined contents."},"expectedHeadSha":{"description":"Commit SHA the caller read from the target branch. The write fails if the branch changed.","type":"string","minLength":1},"sourceVersionId":{"description":"Initialize hosted source from this original static upload before applying operations. Requires a zero expectedHeadSha and version read/download permissions.","type":"string","minLength":1,"maxLength":64},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","operations"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."},"contents":{"type":"string","maxLength":1048576,"description":"Complete replacement contents. Maximum 1 MiB in the request encoding. Omitted files do not change."},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Exact file path from the repository root. Use forward slashes. Do not add a leading slash."}},"required":["action","path"]}]},"description":"File operations to save together in one Git commit. Maximum 100 paths and 4 MiB of combined contents."},"expectedHeadSha":{"description":"Commit SHA the caller read from the target branch. The write fails if the branch changed.","type":"string","minLength":1},"sourceVersionId":{"description":"Initialize hosted source from this original static upload before applying operations. Requires a zero expectedHeadSha and version read/download permissions.","type":"string","minLength":1,"maxLength":64},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","operations"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"commitSha":{"type":"string"},"treeSha":{"type":"string"},"targetBranch":{"type":"string"},"packBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"blobCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"refUpdate":{"type":"object","properties":{"branch":{"type":"string"},"oldSha":{"type":"string"},"newSha":{"type":"string"}},"required":["branch","oldSha","newSha"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","commitSha","treeSha","targetBranch","packBytes","blobCount","refUpdate"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/commits/diff":{"post":{"operationId":"createSpaceSourceCommitFromDiff","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create a repository commit from a diff","description":"Save a unified diff as one Git commit in a hosted repository. Send expectedHeadSha to reject stale writes. A commit does not confirm deployment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"diff":{"type":"string","minLength":1,"maxLength":4194304},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","diff"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"diff":{"type":"string","minLength":1,"maxLength":4194304},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","diff"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"targetBranch":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"diff":{"type":"string","minLength":1,"maxLength":4194304},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"author":{"description":"Git author. Omit it to use the registered profile of the authenticated user or machine credential creator. Attribution does not change permissions.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","targetBranch","commitMessage","diff"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"commitSha":{"type":"string"},"treeSha":{"type":"string"},"targetBranch":{"type":"string"},"packBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"blobCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"refUpdate":{"type":"object","properties":{"branch":{"type":"string"},"oldSha":{"type":"string"},"newSha":{"type":"string"}},"required":["branch","oldSha","newSha"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","commitSha","treeSha","targetBranch","packBytes","blobCount","refUpdate"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/commit":{"get":{"operationId":"getSpaceSourceCommit","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get a source commit","description":"Read commit metadata, including parentShas in Git order. An empty parentShas array identifies a root commit.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"sha","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Full or abbreviated commit SHA to read."}},{"name":"savedOnly","in":"query","required":false,"schema":{"description":"Require this commit in the selected project branch's saved history. Reject draft snapshots.","type":"string"}},{"name":"branch","in":"query","required":false,"schema":{"description":"Project branch for savedOnly. Defaults to the production branch.","type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"commit":{"type":"object","properties":{"sha":{"type":"string"},"parentShas":{"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{40}$"},"description":"Parent commit SHAs in Git order. The array is empty for a root commit."},"message":{"type":"string"},"authorName":{"type":"string"},"authorEmail":{"type":"string"},"committerName":{"type":"string"},"committerEmail":{"type":"string"},"date":{"type":"string"},"signature":{"description":"Armored commit signature. Only populated when reading one commit.","type":["string","null"]}},"required":["sha","parentShas","message","authorName","authorEmail","committerName","committerEmail","date","signature"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","commit"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/sync":{"post":{"operationId":"syncSpaceSource","security":[{"bearerAuth":[]},{"oauth2":["publish:write"]}],"summary":"Sync the space's source","description":"Refreshes the source repository before a build.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ref":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"status":{"type":"string","enum":["idle","syncing","ready","failed"]},"ref":{"type":["string","null"]}},"required":["repositoryConnection","status","ref"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/ephemeral-branch":{"post":{"operationId":"createSpaceSourceEphemeralBranch","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Create an ephemeral repository branch","description":"Create a short-lived repository branch for previews, experiments, and agent edits.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"baseRef":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"baseRef":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"baseRef":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"branch":{"type":"object","properties":{"repositoryId":{"type":"string"},"branch":{"type":"string"},"baseRef":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"ephemeral":{"type":"boolean","const":true}},"required":["repositoryId","branch","baseRef","baseBranch","ephemeral"],"additionalProperties":false}},"required":["repositoryConnection","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"delete":{"operationId":"deleteSpaceSourceEphemeralBranch","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Delete an ephemeral repository branch","description":"Delete a short-lived repository branch after a preview or experiment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"required":["branch"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"branch":{"type":"object","properties":{"repositoryId":{"type":"string"},"branch":{"type":"string"},"baseRef":{"type":["string","null"]},"baseBranch":{"type":["string","null"]},"ephemeral":{"type":"boolean","const":true}},"required":["repositoryId","branch","baseRef","baseBranch","ephemeral"],"additionalProperties":false}},"required":["repositoryConnection","branch"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/ephemeral-remote":{"post":{"operationId":"createSpaceSourceEphemeralRemote","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Get an ephemeral repository remote","description":"Get a signed Git remote for a short-lived repository branch. This operation requires source-read and source-write access.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"branch":{"type":"string","minLength":1},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"remote":{"type":"object","properties":{"repositoryId":{"type":"string"},"cloneUrl":{"type":"string"},"pushUrl":{"type":"string"},"expiresInSeconds":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"branch":{"type":["string","null"]}},"required":["repositoryId","cloneUrl","pushUrl","expiresInSeconds","branch"],"additionalProperties":false}},"required":["repositoryConnection","remote"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/merge":{"post":{"operationId":"mergeSpaceSourceBranches","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Merge repository branches","description":"Merge branches in a hosted repository. Send expectedTargetSha to reject changes if the target branch moved. A merge does not confirm deployment.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sourceBranch":{"type":"string","minLength":1},"targetBranch":{"type":"string","minLength":1},"strategy":{"default":"ff_prefer","type":"string","enum":["merge","ff_only","ff_prefer"]},"sourceIsEphemeral":{"type":"boolean"},"targetIsEphemeral":{"type":"boolean"},"expectedTargetSha":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sourceBranch":{"type":"string","minLength":1},"targetBranch":{"type":"string","minLength":1},"strategy":{"default":"ff_prefer","type":"string","enum":["merge","ff_only","ff_prefer"]},"sourceIsEphemeral":{"type":"boolean"},"targetIsEphemeral":{"type":"boolean"},"expectedTargetSha":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sourceBranch":{"type":"string","minLength":1},"targetBranch":{"type":"string","minLength":1},"strategy":{"default":"ff_prefer","type":"string","enum":["merge","ff_only","ff_prefer"]},"sourceIsEphemeral":{"type":"boolean"},"targetIsEphemeral":{"type":"boolean"},"expectedTargetSha":{"type":"string","minLength":1},"commitMessage":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"committer":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"result":{"type":"string","enum":["merge_commit","fast_forward","no_op","squash","unknown"]},"commitSha":{"type":"string"},"treeSha":{"type":"string"},"source":{"type":"object","properties":{"branch":{"type":"string"},"ephemeral":{"type":"boolean"},"sha":{"type":"string"}},"required":["branch","ephemeral","sha"],"additionalProperties":false},"target":{"type":"object","properties":{"branch":{"type":"string"},"ephemeral":{"type":"boolean"},"oldSha":{"type":"string"},"newSha":{"type":"string"}},"required":["branch","ephemeral","oldSha","newSha"],"additionalProperties":false},"mergeBaseSha":{"type":["string","null"]},"promotedCommits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["repositoryConnection","repositoryId","result","commitSha","treeSha","source","target","mergeBaseSha","promotedCommits"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/notes":{"get":{"operationId":"getSpaceSourceNote","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get a commit note","description":"Returns the Git note attached to a commit, or null when the commit has none.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"sha","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Commit the note is attached to."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"note":{"anyOf":[{"type":"object","properties":{"sha":{"type":"string"},"note":{"type":"string"},"refSha":{"type":"string"}},"required":["sha","note","refSha"],"additionalProperties":false},{"type":"null"}]}},"required":["repositoryConnection","repositoryId","note"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"post":{"operationId":"writeSpaceSourceNote","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Write a commit note","description":"Attaches a Git note to a commit, replacing any existing note unless `append` is set.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"note":{"type":"string","minLength":1},"append":{"default":false,"description":"Append to any existing note instead of replacing it.","type":"boolean"},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha","note"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"note":{"type":"string","minLength":1},"append":{"default":false,"description":"Append to any existing note instead of replacing it.","type":"boolean"},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha","note"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"note":{"type":"string","minLength":1},"append":{"default":false,"description":"Append to any existing note instead of replacing it.","type":"boolean"},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha","note"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"sha":{"type":"string"},"targetRef":{"type":"string"},"baseCommit":{"type":["string","null"]},"newRefSha":{"type":"string"},"success":{"type":"boolean"},"status":{"type":"string"},"message":{"type":["string","null"]}},"required":["repositoryConnection","repositoryId","sha","targetRef","baseCommit","newRefSha","success","status","message"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"delete":{"operationId":"deleteSpaceSourceNote","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"summary":"Delete a commit note","description":"Removes the Git note attached to a commit.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionType":{"type":"string","enum":["connected","hosted"]},"sha":{"type":"string","minLength":1},"expectedRefSha":{"type":"string","minLength":1},"author":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["connectionType","sha"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"sha":{"type":"string"},"targetRef":{"type":"string"},"baseCommit":{"type":["string","null"]},"newRefSha":{"type":"string"},"success":{"type":"boolean"},"status":{"type":"string"},"message":{"type":["string","null"]}},"required":["repositoryConnection","repositoryId","sha","targetRef","baseCommit","newRefSha","success","status","message"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/notes/refs":{"get":{"operationId":"listSpaceSourceNotesRefs","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List notes refs","description":"Returns the repository's Git notes refs and their current tips.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":false,"schema":{"default":"connected","description":"Which of the space's repository connections to act on: `connected` for the repository you linked from a provider, `hosted` for the one Spacefast hosts and you push to.","type":"string","enum":["connected","hosted"]}},{"name":"prefix","in":"query","required":false,"schema":{"description":"Notes ref prefix to enumerate. Defaults to `refs/notes/`.","type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `pagination.nextCursor`.","type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"description":"Maximum notes refs to return.","type":"integer","exclusiveMinimum":0,"maximum":100}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"repositoryConnection":{"type":"object","properties":{"id":{"type":"string","description":"Repository connection id (`rpc_`)."},"spaceId":{"type":"string"},"provider":{"type":"string","enum":["github","gitlab","bitbucket","generic"],"description":"Git host family for the repository connection."},"connectionType":{"type":"string","enum":["connected","hosted"]},"repositoryId":{"type":["string","null"]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","type":["string","null"]},"cloneUrlConfigured":{"default":false,"description":"Whether a repository clone URL is configured.","type":"boolean"},"upstreamUrlConfigured":{"default":false,"description":"Whether an upstream repository URL is configured.","type":"boolean"},"forkState":{"description":"Initial main-branch remix progress, backed by its durable operation.","anyOf":[{"type":"object","properties":{"copied":{"type":"boolean"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]}},"required":["copied","status"],"additionalProperties":false},{"type":"null"}]},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"githubPreviewCommentsEnabled":{"description":"Controls GitHub preview comments for this Space. Set null to use the team setting.","type":["boolean","null"]},"buildSettings":{"type":"object","properties":{"rootDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"default":null,"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"default":false,"type":"boolean"},"timeoutSeconds":{"default":900,"type":"integer","minimum":60,"maximum":7200}},"required":["rootDirectory","installDirectory","installCommand","buildCommand","outputDirectory","ignoredBuildCommand","frameworkPreset","platformPreset","allowUnsupportedPlatformFeatures","timeoutSeconds"],"additionalProperties":false,"description":"Resolved build settings. Builds persist this as an immutable `settingsSnapshot`."},"syncStatus":{"type":"string","enum":["idle","syncing","ready","failed"]},"providerAccessStatus":{"default":"active","type":"string","enum":["active","suspended","revoked","reauthorization_required"]},"providerAccessError":{"default":null,"type":["string","null"]},"lastSyncedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"lastSyncError":{"type":["string","null"]},"syncRunId":{"type":["string","null"]},"connectedUserId":{"type":["string","null"]},"createdAt":{"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))$"},"updatedAt":{"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","spaceId","provider","connectionType","repositoryId","installationId","cloneUrlConfigured","upstreamUrlConfigured","repositoryName","repositoryFullName","defaultBranch","productionBranch","credentialConfigured","autoDeployProduction","autoDeployPreviews","buildSettings","syncStatus","providerAccessStatus","providerAccessError","lastSyncedAt","lastSyncError","syncRunId","connectedUserId","createdAt","updatedAt"],"additionalProperties":false},"repositoryId":{"type":"string"},"prefix":{"type":"string"},"refs":{"type":"array","items":{"type":"object","properties":{"ref":{"type":"string"},"sha":{"type":"string"}},"required":["ref","sha"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["repositoryConnection","repositoryId","prefix","refs","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces":{"get":{"operationId":"listSpaceSourceWorkspaces","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"List durable source workspaces","description":"List open source workspaces by default. If the Space has no hosted source yet, this returns an empty page. You do not need to connect an external repository. Use the closed status to inspect workspace history. Results are newest first.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"schema":{"default":"open","description":"Open includes initializing, active, and conflicted workspaces. Use closed for history.","type":"string","enum":["open","closed"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspaces":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["workspaces","pagination"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]},"post":{"operationId":"createSpaceSourceWorkspace","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Create a durable source workspace","description":"Create a workspace without a local checkout. Send a unique operationId in the request body. Reuse that operationId and the exact input after an uncertain response. Read the workspace ID from data.workspace.id in the API response. Use this ID as workspaceId in later requests.\n\nThe API uses saved source when it exists. Otherwise, omit originalUploadVersionId to import the current eligible direct upload. Send the field only to pin a known eligible upload. If neither source exists, the API creates an empty baseline. This action does not deploy or change the live version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"name":{"type":"string","minLength":1,"maxLength":160},"targetBranch":{"description":"Existing project branch. Defaults to the production branch.","type":"string","minLength":1,"maxLength":255},"originalUploadVersionId":{"description":"Pinned eligible direct upload to import if this Space has no saved source. Omit to import the current eligible direct upload automatically. Never send a build output version.","type":"string","minLength":1,"maxLength":64},"author":{"description":"Omit to use the registered name and email. If they are incomplete, send the author once when you create the workspace. This affects attribution only.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["operationId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"name":{"type":"string","minLength":1,"maxLength":160},"targetBranch":{"description":"Existing project branch. Defaults to the production branch.","type":"string","minLength":1,"maxLength":255},"originalUploadVersionId":{"description":"Pinned eligible direct upload to import if this Space has no saved source. Omit to import the current eligible direct upload automatically. Never send a build output version.","type":"string","minLength":1,"maxLength":64},"author":{"description":"Omit to use the registered name and email. If they are incomplete, send the author once when you create the workspace. This affects attribution only.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["operationId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"name":{"type":"string","minLength":1,"maxLength":160},"targetBranch":{"description":"Existing project branch. Defaults to the production branch.","type":"string","minLength":1,"maxLength":255},"originalUploadVersionId":{"description":"Pinned eligible direct upload to import if this Space has no saved source. Omit to import the current eligible direct upload automatically. Never send a build output version.","type":"string","minLength":1,"maxLength":64},"author":{"description":"Omit to use the registered name and email. If they are incomplete, send the author once when you create the workspace. This affects attribution only.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["operationId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}":{"get":{"operationId":"getSpaceSourceWorkspaceStatus","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Read source workspace status","description":"Read the workspace from data.workspace in the API response. It contains the current revision, saved base, working snapshot, and staged snapshot. Use its id as workspaceId in later requests. This does not change files.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/files":{"post":{"operationId":"editSpaceSourceWorkspaceFiles","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Edit pending source files","description":"Apply complete file replacements and deletions to working files. Keep staging unchanged. Do not commit or deploy.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents. Omitted files do not change."},"encoding":{"type":"string","enum":["utf8","base64","hex"]},"mode":{"type":"string","enum":["100644","100755","120000","160000"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096}},"required":["action","path"]}]}}},"required":["expectedRevision","operationId","operations"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents. Omitted files do not change."},"encoding":{"type":"string","enum":["utf8","base64","hex"]},"mode":{"type":"string","enum":["100644","100755","120000","160000"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096}},"required":["action","path"]}]}}},"required":["expectedRevision","operationId","operations"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"operations":{"minItems":1,"maxItems":100,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"upsert"},"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents. Omitted files do not change."},"encoding":{"type":"string","enum":["utf8","base64","hex"]},"mode":{"type":"string","enum":["100644","100755","120000","160000"]}},"required":["action","path","contents"]},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1,"maxLength":4096}},"required":["action","path"]}]}}},"required":["expectedRevision","operationId","operations"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/diff":{"get":{"operationId":"getSpaceSourceWorkspaceDiff","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Read exact source workspace changes","description":"Compare working files with the saved base, staged snapshot with the base, or working files with staging. Hunk IDs require this revision.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"view","in":"query","required":false,"schema":{"default":"working","type":"string","enum":["working","staged","unstaged"]}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":4096}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"view":{"type":"string","enum":["working","staged","unstaged"]},"baseCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"targetCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"stats":{"type":"object","properties":{"files":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["files","additions","deletions","changes"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"oldPath":{"type":["string","null"]},"state":{"type":"string"},"additions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"deletions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"patch":{"type":"string"},"patchTruncated":{"type":"boolean"},"wholeFileOnly":{"type":"boolean"},"hunks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"oldStart":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"oldLines":{"type":"integer","minimum":0,"maximum":9007199254740991},"newStart":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newLines":{"type":"integer","minimum":0,"maximum":9007199254740991},"patch":{"type":"string"}},"required":["id","oldStart","oldLines","newStart","newLines","patch"],"additionalProperties":false}}},"required":["path","oldPath","state","additions","deletions","changes","patch","patchTruncated","wholeFileOnly","hunks"],"additionalProperties":false}},"filteredFiles":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"oldPath":{"type":["string","null"]},"state":{"type":"string"}},"required":["path","oldPath","state"],"additionalProperties":false}}},"required":["workspace","view","baseCommitSha","targetCommitSha","stats","files","filteredFiles"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/stage":{"post":{"operationId":"stageSpaceSourceWorkspaceChanges","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Select source changes for a commit","description":"Copy selected files or hunks from working files into staging. Do not commit or deploy.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/unstage":{"post":{"operationId":"unstageSpaceSourceWorkspaceChanges","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Remove changes from source staging","description":"Remove selected files or hunks from staging. Keep working files unchanged. Do not commit or deploy.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"hunkIds":{"description":"Exact hunk IDs from the current diff. Do not construct or reuse stale IDs.","minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"all":{"type":"boolean","const":true}},"required":["expectedRevision","operationId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/commit":{"post":{"operationId":"commitSpaceSourceWorkspaceChanges","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Save staged source as one commit","description":"Commit only the staged tree. Keep other pending changes. Reject a moved project branch. Configured automatic deployment may start a build.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"message":{"type":"string","minLength":1,"maxLength":4096},"author":{"description":"Omit to reuse the author stored when the workspace was created.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["expectedRevision","operationId","message"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"message":{"type":"string","minLength":1,"maxLength":4096},"author":{"description":"Omit to reuse the author stored when the workspace was created.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["expectedRevision","operationId","message"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"message":{"type":"string","minLength":1,"maxLength":4096},"author":{"description":"Omit to reuse the author stored when the workspace was created.","type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["name","email"]}},"required":["expectedRevision","operationId","message"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/restore":{"post":{"operationId":"restoreSpaceSourceWorkspaceFiles","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Restore selected working files","description":"Copy files from staging or an exact source commit into working files. Keep staging unchanged. Do not commit or deploy.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"sourceCommitSha":{"description":"Saved source commit to copy from. Omit to copy from the staged snapshot. Staging does not change.","type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["expectedRevision","operationId","paths"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"sourceCommitSha":{"description":"Saved source commit to copy from. Omit to copy from the staged snapshot. Staging does not change.","type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["expectedRevision","operationId","paths"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"paths":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1,"maxLength":4096}},"sourceCommitSha":{"description":"Saved source commit to copy from. Omit to copy from the staged snapshot. Staging does not change.","type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["expectedRevision","operationId","paths"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/undo":{"post":{"operationId":"prepareSpaceSourceWorkspaceUndo","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Prepare the inverse of a source commit","description":"Apply the inverse of a non-merge commit to working files. Resolve conflicts explicitly. Keep staging and saved history unchanged.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$","description":"Non-merge source commit to undo in working files. This does not commit or deploy."}},"required":["expectedRevision","operationId","sourceCommitSha"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$","description":"Non-merge source commit to undo in working files. This does not commit or deploy."}},"required":["expectedRevision","operationId","sourceCommitSha"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$","description":"Non-merge source commit to undo in working files. This does not commit or deploy."}},"required":["expectedRevision","operationId","sourceCommitSha"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/sync":{"post":{"operationId":"syncSpaceSourceWorkspace","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Sync a workspace with its project branch","description":"Replay staged and working changes onto the new project head. Preserve both layers. Keep the original snapshots until all conflicts are resolved.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."}},"required":["expectedRevision","operationId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."}},"required":["expectedRevision","operationId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."}},"required":["expectedRevision","operationId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/conflicts":{"get":{"operationId":"getSpaceSourceWorkspaceConflicts","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Read pinned source conflict sides","description":"Read exact base, ours, and theirs snapshots for the current conflict phase. Unavailable contents never mean a deleted file.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"conflicts":{"anyOf":[{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false},{"type":"null"}]}},"required":["workspace","conflicts"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/resolve-conflicts":{"post":{"operationId":"resolveSpaceSourceWorkspaceConflicts","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Resolve selected source conflicts","description":"Apply complete file contents, explicit deletions, or verified pinned sides. Continue the native merge. Do not commit or deploy.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"resolutions":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents for this resolution."},"encoding":{"description":"Encoding of contents. Omit it for UTF-8.","type":"string","enum":["utf8","base64","hex"]},"mode":{"description":"File mode for contents. Omit it to keep the current mode.","type":"string","enum":["100644","100755","120000","160000"]}},"required":["path","contents"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"delete":{"type":"boolean","const":true,"description":"Delete this path. Do not send contents, encoding, or mode."}},"required":["path","delete"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"side":{"type":"string","enum":["base","ours","theirs"],"description":"Copy this exact pinned side. Do not send contents, encoding, or mode."}},"required":["path","side"],"additionalProperties":false}]}}},"required":["expectedRevision","operationId","resolutions"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"resolutions":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents for this resolution."},"encoding":{"description":"Encoding of contents. Omit it for UTF-8.","type":"string","enum":["utf8","base64","hex"]},"mode":{"description":"File mode for contents. Omit it to keep the current mode.","type":"string","enum":["100644","100755","120000","160000"]}},"required":["path","contents"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"delete":{"type":"boolean","const":true,"description":"Delete this path. Do not send contents, encoding, or mode."}},"required":["path","delete"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"side":{"type":"string","enum":["base","ours","theirs"],"description":"Copy this exact pinned side. Do not send contents, encoding, or mode."}},"required":["path","side"],"additionalProperties":false}]}}},"required":["expectedRevision","operationId","resolutions"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"resolutions":{"minItems":1,"maxItems":1000,"type":"array","items":{"anyOf":[{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"contents":{"type":"string","maxLength":1048576,"description":"Complete file contents for this resolution."},"encoding":{"description":"Encoding of contents. Omit it for UTF-8.","type":"string","enum":["utf8","base64","hex"]},"mode":{"description":"File mode for contents. Omit it to keep the current mode.","type":"string","enum":["100644","100755","120000","160000"]}},"required":["path","contents"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"delete":{"type":"boolean","const":true,"description":"Delete this path. Do not send contents, encoding, or mode."}},"required":["path","delete"],"additionalProperties":false},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"side":{"type":"string","enum":["base","ours","theirs"],"description":"Copy this exact pinned side. Do not send contents, encoding, or mode."}},"required":["path","side"],"additionalProperties":false}]}}},"required":["expectedRevision","operationId","resolutions"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/spaces/{spaceId}/source/workspaces/{workspaceId}/close":{"post":{"operationId":"closeSpaceSourceWorkspace","security":[{"bearerAuth":[]},{"oauth2":["spaces:write","spaces:read"]}],"summary":"Close a source workspace","description":"Remove managed workspace refs. Require explicit discard for pending changes. Keep saved project history unchanged.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"workspaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"discardPending":{"default":false,"description":"Set true only when the user requests discarding pending changes.","type":"boolean"}},"required":["expectedRevision","operationId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"discardPending":{"default":false,"description":"Set true only when the user requests discarding pending changes.","type":"boolean"}},"required":["expectedRevision","operationId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Revision from the last workspace response. Read the workspace again after a revision conflict."},"operationId":{"type":"string","minLength":1,"maxLength":128,"description":"Unique ID for this operation. Reuse this ID and the same input after an uncertain response."},"discardPending":{"default":false,"description":"Set true only when the user requests discarding pending changes.","type":"boolean"}},"required":["expectedRevision","operationId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string"},"repositoryId":{"type":"string"},"targetBranch":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"state":{"type":"string","enum":["initializing","active","conflicted","closed"]},"baseCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"indexCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"workingCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"headCommitSha":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"originalUploadVersionId":{"type":["string","null"]},"hasStagedChanges":{"type":"boolean"},"hasUnstagedChanges":{"type":"boolean"},"hasPendingChanges":{"type":"boolean"},"needsSync":{"type":"boolean"},"pendingOperationId":{"type":["string","null"]},"autoDeploy":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","spaceId","repositoryId","targetBranch","name","revision","state","baseCommitSha","indexCommitSha","workingCommitSha","headCommitSha","originalUploadVersionId","hasStagedChanges","hasUnstagedChanges","hasPendingChanges","needsSync","pendingOperationId","autoDeploy","createdAt","updatedAt"],"additionalProperties":false},"commit":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"parentSourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"message":{"type":"string"},"autoDeploy":{"type":"boolean"}},"required":["sourceCommitSha","parentSourceCommitSha","message","autoDeploy"],"additionalProperties":false},"conflicts":{"type":"object","properties":{"phase":{"type":"string","enum":["staged","working","undo"]},"labels":{"type":"object","properties":{"ours":{"type":"string"},"theirs":{"type":"string"}},"required":["ours","theirs"],"additionalProperties":false},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"result":{"type":"string"},"base":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"ours":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false},"theirs":{"type":"object","properties":{"sourceCommitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"},"content":{"type":["string","null"]},"exists":{"type":"boolean"},"binary":{"type":"boolean"},"truncated":{"type":"boolean"},"mode":{"type":["string","null"]}},"required":["sourceCommitSha","content","exists","binary","truncated","mode"],"additionalProperties":false}},"required":["path","result","base","ours","theirs"],"additionalProperties":false}}},"required":["phase","labels","files"],"additionalProperties":false}},"required":["workspace"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Git"]}},"/v1/auth/methods":{"get":{"operationId":"listAuthMethods","summary":"List sign-in methods","description":"Returns the sign-in methods, providers and second factors this deployment supports, with the public client keys those methods need.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"providers":{"type":"object","properties":{"wpcom":{"type":"boolean"},"google":{"type":"boolean"},"github":{"type":"boolean"},"twitter":{"type":"boolean"}},"required":["wpcom","google","github","twitter"],"additionalProperties":false},"emailOtp":{"type":"boolean"},"password":{"type":"boolean"},"captcha":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","const":"turnstile"},"siteKey":{"type":"string"}},"required":["provider","siteKey"],"additionalProperties":false},{"type":"null"}]},"googleOneTapClientId":{"type":["string","null"]}},"required":["providers","emailOtp","password","captcha","googleOneTapClientId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/device":{"post":{"operationId":"startDeviceAuthorization","summary":"Start a device authorization flow","description":"Issues a device code and user code so a CLI or headless client can sign in through the browser. Claim flows may attach an explicit server-side claim handoff.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"default":"spacefast-cli","description":"Spacefast client starting the flow, shown on the verification page. Omit it unless you are the Spacefast MCP server.","type":"string","enum":["spacefast-cli","spacefast-mcp"]},"access":{"default":"agent","description":"Access profile the device requests. One word with a server-owned meaning; the approver can narrow the resulting scopes on the verification page but never widen them.","type":"string","enum":["read","agent","agent-personal-pages"]},"claim":{"description":"Explicit claim handoff intent. Only claim flows send this; ordinary device login leaves it absent.","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Anonymous space id being claimed with this device flow."},"claimToken":{"type":"string","minLength":1,"maxLength":512,"description":"Anonymous Space key. Stored server-side only as a hash."}},"required":["spaceId","claimToken"],"additionalProperties":false}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"default":"spacefast-cli","description":"Spacefast client starting the flow, shown on the verification page. Omit it unless you are the Spacefast MCP server.","type":"string","enum":["spacefast-cli","spacefast-mcp"]},"access":{"default":"agent","description":"Access profile the device requests. One word with a server-owned meaning; the approver can narrow the resulting scopes on the verification page but never widen them.","type":"string","enum":["read","agent","agent-personal-pages"]},"claim":{"description":"Explicit claim handoff intent. Only claim flows send this; ordinary device login leaves it absent.","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Anonymous space id being claimed with this device flow."},"claimToken":{"type":"string","minLength":1,"maxLength":512,"description":"Anonymous Space key. Stored server-side only as a hash."}},"required":["spaceId","claimToken"],"additionalProperties":false}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"clientId":{"default":"spacefast-cli","description":"Spacefast client starting the flow, shown on the verification page. Omit it unless you are the Spacefast MCP server.","type":"string","enum":["spacefast-cli","spacefast-mcp"]},"access":{"default":"agent","description":"Access profile the device requests. One word with a server-owned meaning; the approver can narrow the resulting scopes on the verification page but never widen them.","type":"string","enum":["read","agent","agent-personal-pages"]},"claim":{"description":"Explicit claim handoff intent. Only claim flows send this; ordinary device login leaves it absent.","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"description":"Anonymous space id being claimed with this device flow."},"claimToken":{"type":"string","minLength":1,"maxLength":512,"description":"Anonymous Space key. Stored server-side only as a hash."}},"required":["spaceId","claimToken"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"description":"High-entropy bearer capability the device polls with. Never log or display it."},"userCode":{"type":"string","minLength":1,"description":"Short display code the user types on the dashboard verification page."},"verificationUrl":{"type":"string","format":"uri","description":"Dashboard verification page URL where the user approves this device."},"interval":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minimum number of seconds the device must wait between polls."},"expiresAt":{"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))$","description":"Instant after which the device and user codes are no longer redeemable."}},"required":["deviceCode","userCode","verificationUrl","interval","expiresAt"],"additionalProperties":false},"requiresAction":{"type":"object","properties":{"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"instruction":{"type":"string","description":"The step a person must complete out of band."},"url":{"description":"Where to send the human to complete the step, when a destination exists.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"pollUrl":{"description":"Where to POST the continuationToken to poll this flow: `/v1/actions/resume`.","type":"string","format":"uri"},"continuationToken":{"type":"string","minLength":1,"description":"Short-lived, principal-scoped capability for this flow. Present it to POST /v1/actions/resume to poll and complete. Single-use on completion. A secret: never log it."},"pollAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minimum seconds to wait before calling resume again."},"expiresAt":{"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))$","description":"Deadline for the human step. Resume after this returns terminal `expired`; the token survives a short grace so resume can say so, but the flow can no longer be redeemed."}},"required":["actionType","instruction","continuationToken","pollAfterSeconds","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"get":{"operationId":"getDeviceAuthorization","summary":"Look up a device verification code","description":"Returns the requester context for a user code so the approval page can show what is being authorized.","parameters":[{"name":"user_code","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"description":"User code typed by the person approving the device (dashes ignored)."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","denied","expired","consumed"],"description":"Device authorization state. `approved` carries the one-time API key exactly once, then the record is `consumed`."},"clientId":{"description":"Requesting client identifier recorded at device start.","type":["string","null"]},"requestedAccess":{"type":"object","properties":{"profile":{"anyOf":[{"type":"string","enum":["read","agent","agent-personal-pages"]},{"type":"null"}],"description":"Access profile the requested scopes exactly match, if any."},"scopes":{"type":"array","items":{"type":"string","enum":["teams:read","teams:create","teams:members.write","sell:write","spaces:read","spaces:write","spaces:rename","spaces:access.write","spaces:delete","versions:download","publish:write","domains:read","domains:write","connectors:read","connectors:write","connectors:execute","person-pages:read"]},"description":"Scopes the device requested. The approval page renders exactly these."}},"required":["profile","scopes"],"additionalProperties":false,"description":"Server-resolved access request. Ids only; copy is derived client-side."},"origin":{"description":"Request origin (client IP) recorded when the device flow started.","type":["string","null"]},"expiresAt":{"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))$","description":"Instant after which this device authorization can no longer be approved."},"claim":{"anyOf":[{"type":"object","properties":{"spaceId":{"type":"string","description":"Anonymous space that will be claimed if approval succeeds."},"title":{"description":"Display title of the anonymous space, if available.","type":["string","null"]},"liveUrl":{"description":"Current live URL of the anonymous space, if any.","type":["string","null"]}},"required":["spaceId","title","liveUrl"],"additionalProperties":false},{"type":"null"}],"description":"Explicit claim handoff attached to this device authorization, if any."}},"required":["status","clientId","requestedAccess","origin","expiresAt","claim"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/device/approve":{"post":{"security":[{"sessionCookie":[]}],"operationId":"approveDeviceAuthorization","summary":"Approve a device authorization","description":"Approves a pending device login with an enforced team scope and an explicit scope checklist. If an explicit claim handoff is attached, the anonymous space is claimed into the chosen destination team after approval wins. The CLI receives a one-time API key on its next poll.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being approved (dashes ignored)."},"teams":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}],"description":"Team access granted to the device: all current and future memberships, an explicit non-empty team list, or sign-in-only access."},"claimTeamId":{"description":"Explicit destination team for a claim handoff. Required when the flow carries a claim.","type":"string","minLength":1},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["teams:read","teams:create","teams:members.write","sell:write","spaces:read","spaces:write","spaces:rename","spaces:access.write","spaces:delete","versions:download","publish:write","domains:read","domains:write","connectors:read","connectors:write","connectors:execute","person-pages:read"]},"description":"OAuth scopes the approver granted — a subset of the scopes the device requested. Authority is these scopes' actions, bounded per team by the holder's live role on every request."},"agentContinuation":{"description":"Applies when the device flow carries an anonymous-space claim. Keeps the publishing agent authorized after the claim through the one-time claim-token exchange. Defaults to false.","type":"boolean"}},"required":["userCode","teams","scopes"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being approved (dashes ignored)."},"teams":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}],"description":"Team access granted to the device: all current and future memberships, an explicit non-empty team list, or sign-in-only access."},"claimTeamId":{"description":"Explicit destination team for a claim handoff. Required when the flow carries a claim.","type":"string","minLength":1},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["teams:read","teams:create","teams:members.write","sell:write","spaces:read","spaces:write","spaces:rename","spaces:access.write","spaces:delete","versions:download","publish:write","domains:read","domains:write","connectors:read","connectors:write","connectors:execute","person-pages:read"]},"description":"OAuth scopes the approver granted — a subset of the scopes the device requested. Authority is these scopes' actions, bounded per team by the holder's live role on every request."},"agentContinuation":{"description":"Applies when the device flow carries an anonymous-space claim. Keeps the publishing agent authorized after the claim through the one-time claim-token exchange. Defaults to false.","type":"boolean"}},"required":["userCode","teams","scopes"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being approved (dashes ignored)."},"teams":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}],"description":"Team access granted to the device: all current and future memberships, an explicit non-empty team list, or sign-in-only access."},"claimTeamId":{"description":"Explicit destination team for a claim handoff. Required when the flow carries a claim.","type":"string","minLength":1},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["teams:read","teams:create","teams:members.write","sell:write","spaces:read","spaces:write","spaces:rename","spaces:access.write","spaces:delete","versions:download","publish:write","domains:read","domains:write","connectors:read","connectors:write","connectors:execute","person-pages:read"]},"description":"OAuth scopes the approver granted — a subset of the scopes the device requested. Authority is these scopes' actions, bounded per team by the holder's live role on every request."},"agentContinuation":{"description":"Applies when the device flow carries an anonymous-space claim. Keeps the publishing agent authorized after the claim through the one-time claim-token exchange. Defaults to false.","type":"boolean"}},"required":["userCode","teams","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","const":"approved","description":"The device authorization is approved."},"claimedSpaceId":{"description":"Space claimed by the server-side claim handoff, if one was attached.","type":["string","null"]}},"required":["status","claimedSpaceId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/device/deny":{"post":{"security":[{"sessionCookie":[]}],"operationId":"denyDeviceAuthorization","summary":"Deny a device authorization","description":"Denies a pending device login so the polling client stops with access_denied.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being denied (dashes ignored)."}},"required":["userCode"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being denied (dashes ignored)."}},"required":["userCode"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":32,"description":"User code shown on the device being denied (dashes ignored)."}},"required":["userCode"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","const":"denied","description":"The device authorization is denied."}},"required":["status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/device/poll":{"post":{"operationId":"pollDeviceAuthorization","summary":"Poll a device authorization","description":"Polls a pending device login at the advised interval and redeems the one-time API key once the user approves.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":512,"description":"Device code returned by POST /v1/auth/device. Body-only, never a URL."}},"required":["deviceCode"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":512,"description":"Device code returned by POST /v1/auth/device. Body-only, never a URL."}},"required":["deviceCode"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":512,"description":"Device code returned by POST /v1/auth/device. Body-only, never a URL."}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["pending","approved","denied","expired","consumed"],"description":"Device authorization state. `approved` carries the one-time API key exactly once, then the record is `consumed`."},"apiKey":{"description":"The minted API key including its one-time `secret`. Present only on the first poll after approval.","type":"object","properties":{"id":{"type":"string","description":"API key id."},"name":{"description":"Human-readable key name.","type":["string","null"]},"tenantId":{"description":"Tenant the key belongs to.","type":["string","null"]},"mode":{"type":"string","enum":["live","test"],"description":"`test` when the key belongs to a linked test tenant, `live` otherwise."},"subject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","team","external","system"],"description":"Subject kind the key acts as in audit records."},"id":{"type":"string","minLength":1,"description":"Stable subject id."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Subject the key acts as."},"ownerPrincipal":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["team","external"],"description":"Principal type that owns this key."},"id":{"type":"string","minLength":1,"description":"Stable principal id (Better Auth team id, or external id)."}},"required":["type","id"],"additionalProperties":false},{"type":"null"}],"description":"Owning principal (ownership metadata, never the authorization gate)."},"createdByUserId":{"description":"User who created the key, or null for automation. Tenant-key creators are recorded for audit and do not own the key's authority.","type":["string","null"]},"collection":{"type":"string","enum":["team","tenant"],"description":"Disjoint resource collection this key addresses."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","domain_manager","team_admin","billing_viewer","partner_admin"],"description":"Preset compiled into a concrete access policy when the key is created."},{"type":"null"}],"description":"Preset the policy was compiled from, if any."},"teamScope":{"anyOf":[{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]},{"type":"null"}],"description":"Membership-following team scope for a device-login key, or null for legacy keys."},"policy":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"2026-06-09","description":"Must be the current platform policy version."},"statements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"effect":{"type":"string","enum":["allow","deny"],"description":"Explicit deny always wins over allow."},"actions":{"minItems":1,"type":"array","items":{"type":"string","enum":["spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","spaces:policy.write","spaces:access.write","versions:read","versions:promote","versions:delete","versions:download","domains:read","domains:create","domains:verify","domains:assign","domains:bind","domains:delete","domains:dns.write","domains:dns.credentials.write","domains:purchase","webhooks:read","webhooks:write","builds:read","builds:trigger","builds:create","variables:read","variables:write","tenants:read","tenants:write","principals:read","principals:write","infrastructure:read","teams:read","teams:create","teams:write","teams:members.write","sell:write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","connectors:read","connectors:write","connectors:execute","runtime:manage","*"],"description":"Namespaced IAM-lite action (`noun:verb`), or `*` for all actions."},"description":"Actions this statement covers."},"resources":{"minItems":1,"type":"array","items":{"type":"string","maxLength":512,"description":"Resource URI from the resource union: stt://tenant/{t}, …/partner/{team}[/*], …/partner/{team}/principal/{id}[/*], …/principal/(team|external)/{id}[/*], …/site/{id}[/*], …/space/{id}[/*], …/site/{id}/space/{id}[/*], …/domain/{id}, or …/domain-group/{id}."},"description":"Resource URIs this statement covers (wildcards cover subtrees)."},"conditions":{"description":"AND condition attributes. Unresolvable attributes fail closed: no match for allow, and match for deny.","type":"object","properties":{"request.client":{"description":"Restricts the statement to one resolved request client.","type":"string","enum":["dashboard","cli","api","worker"]}},"additionalProperties":false}},"required":["effect","actions","resources"],"additionalProperties":false},"description":"Evaluation order: explicit deny wins, explicit allow permits, otherwise implicit deny."}},"required":["version","statements"],"additionalProperties":false,"description":"IAM-lite access policy evaluated for every credentialed request."},{"type":"null"}],"description":"Effective access policy. A key authorizes by policy only."},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Caller-supplied metadata."},"secretPreview":{"type":"string","description":"Masked secret preview (prefix and last characters)."},"secret":{"description":"Full secret. Returned once, at creation only.","type":"string"},"notBefore":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected before this instant."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Key is rejected from this instant."},"ipAllowlist":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"CIDR/IP allowlist. Requests from other addresses are rejected."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Revocation instant."},"enabled":{"type":"boolean","description":"Whether the key currently authenticates."},"createdAt":{"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))$","description":"Creation instant."},"updatedAt":{"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))$","description":"Last update instant."},"lastRequestAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last authenticated request instant."}},"required":["id","name","tenantId","mode","subject","ownerPrincipal","createdByUserId","collection","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false},"access":{"description":"What was granted, in the words the approval page used. Present alongside `apiKey`.","type":"object","properties":{"profile":{"anyOf":[{"type":"string","enum":["read","agent","agent-personal-pages"]},{"type":"null"}],"description":"Access profile the granted scopes exactly match, or null for a customized grant."},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["teams:read","teams:create","teams:members.write","sell:write","spaces:read","spaces:write","spaces:rename","spaces:access.write","spaces:delete","versions:download","publish:write","domains:read","domains:write","connectors:read","connectors:write","connectors:execute","person-pages:read"]},"description":"Exact scopes the approver granted. The one authoritative description."},"teams":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}],"description":"Team access the approver granted."}},"required":["profile","scopes","teams"],"additionalProperties":false},"claimedSpaceId":{"description":"Space claimed during approval, when the device flow was started by `sf spaces claim`.","type":["string","null"]}},"required":["status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/emails":{"get":{"security":[{"sessionCookie":[]}],"operationId":"listAccountEmails","summary":"List your verified email addresses","description":"Returns every verified address on the calling account, flagging the primary one. Addresses waiting on a confirmation code are not listed: they are not on the account yet.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"isPrimary":{"type":"boolean"},"verifiedAt":{"type":"string"},"verificationMethod":{"type":"string","enum":["email_code","oauth","admin","migration"]}},"required":["id","email","isPrimary","verifiedAt","verificationMethod"],"additionalProperties":false}}},"required":["emails"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]},"post":{"security":[{"sessionCookie":[]}],"operationId":"addAccountEmail","summary":"Start adding an email address","description":"Mails a six-digit confirmation code to the address. The address joins the account only once that code is confirmed. Needs a recent identity confirmation.","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}},"required":["email"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320}},"required":["email"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320}},"required":["email"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"email":{"type":"string"},"expiresAt":{"type":"string"}},"required":["email","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/emails/verify":{"post":{"security":[{"sessionCookie":[]}],"operationId":"verifyAccountEmail","summary":"Confirm an email address","description":"Redeems the code mailed to the address and adds it to the account as a verified address. Returns the account's addresses.","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},"code":{"type":"string","minLength":1,"maxLength":16}},"required":["email","code"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"code":{"type":"string","minLength":1,"maxLength":16}},"required":["email","code"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"code":{"type":"string","minLength":1,"maxLength":16}},"required":["email","code"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"isPrimary":{"type":"boolean"},"verifiedAt":{"type":"string"},"verificationMethod":{"type":"string","enum":["email_code","oauth","admin","migration"]}},"required":["id","email","isPrimary","verifiedAt","verificationMethod"],"additionalProperties":false}}},"required":["emails"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/emails/{emailId}":{"delete":{"security":[{"sessionCookie":[]}],"operationId":"deleteAccountEmail","summary":"Remove an email address","description":"Drops a verified address from the account. The primary address cannot be removed; make another one primary first. Needs a recent identity confirmation.","parameters":[{"name":"emailId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"isPrimary":{"type":"boolean"},"verifiedAt":{"type":"string"},"verificationMethod":{"type":"string","enum":["email_code","oauth","admin","migration"]}},"required":["id","email","isPrimary","verifiedAt","verificationMethod"],"additionalProperties":false}}},"required":["emails"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/emails/{emailId}/primary":{"post":{"security":[{"sessionCookie":[]}],"operationId":"setPrimaryAccountEmail","summary":"Make an address primary","description":"Points the account at one of its verified addresses: account mail, the Gravatar avatar, and sign-in follow it. The previous primary stays on the account as a secondary address. Needs a recent identity confirmation.","parameters":[{"name":"emailId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"isPrimary":{"type":"boolean"},"verifiedAt":{"type":"string"},"verificationMethod":{"type":"string","enum":["email_code","oauth","admin","migration"]}},"required":["id","email","isPrimary","verifiedAt","verificationMethod"],"additionalProperties":false}}},"required":["emails"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/auth/password":{"post":{"security":[{"sessionCookie":[]}],"operationId":"setAccountPassword","summary":"Add a password to your account","description":"Adds an optional password to an account created through a mailed code or a provider. Rejects passwords found in public breach corpora. Changing an existing password is a different flow. Needs a recent identity confirmation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":8,"maxLength":128}},"required":["password"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":8,"maxLength":128}},"required":["password"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"password":{"type":"string","minLength":8,"maxLength":128}},"required":["password"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"passwordSet":{"type":"boolean","const":true}},"required":["passwordSet"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Account"]}},"/v1/approvals":{"post":{"security":[{"bearerAuth":[]}],"operationId":"requestApproval","summary":"Request a user decision for an agent action","description":"Asks the signed-in user to approve one agent action before it runs: a `confirmation` for a sensitive operation on an exact resource revision, or an `elevation` that temporarily adds `requestedScopes`. Spacefast shows the user your rationale and the target, and nothing changes until they decide in Spacefast; an agent cannot approve its own request. The rationale, resource, requesting credential, and grant cannot change after creation. Poll the decision with resumeAction and the returned continuation token. Request an elevation only for an action the user asked for.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["confirmation","elevation"]},"operation":{"type":"string","enum":["publish","deploy","version_rollback","space_delete","space_transfer","team_access","domain_purchase","domain_dns_change"]},"requestedScopes":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"rationale":{"type":"string","minLength":1,"maxLength":1024},"resource":{"type":"object","properties":{"kind":{"type":"string","enum":["team","space","version","domain","connector_run"]},"id":{"type":"string","minLength":1},"revision":{"description":"The resource revision. Required for every operation except team_access.","anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"targetTeamId":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"quote":{"type":"null"}},"required":["kind","operation","rationale","resource"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["confirmation","elevation"]},"operation":{"type":"string","enum":["publish","deploy","version_rollback","space_delete","space_transfer","team_access","domain_purchase","domain_dns_change"]},"requestedScopes":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"rationale":{"type":"string","minLength":1,"maxLength":1024},"resource":{"type":"object","properties":{"kind":{"type":"string","enum":["team","space","version","domain","connector_run"]},"id":{"type":"string","minLength":1},"revision":{"description":"The resource revision. Required for every operation except team_access.","anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"targetTeamId":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"quote":{"type":"null"}},"required":["kind","operation","rationale","resource"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["confirmation","elevation"]},"operation":{"type":"string","enum":["publish","deploy","version_rollback","space_delete","space_transfer","team_access","domain_purchase","domain_dns_change"]},"requestedScopes":{"default":[],"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},"rationale":{"type":"string","minLength":1,"maxLength":1024},"resource":{"type":"object","properties":{"kind":{"type":"string","enum":["team","space","version","domain","connector_run"]},"id":{"type":"string","minLength":1},"revision":{"description":"The resource revision. Required for every operation except team_access.","anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"targetTeamId":{"type":"string","minLength":1}},"required":["kind","id"],"additionalProperties":false},"quote":{"type":"null"}},"required":["kind","operation","rationale","resource"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"approvalId":{"type":"string"}},"required":["approvalId"],"additionalProperties":false},"requiresAction":{"type":"object","properties":{"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"instruction":{"type":"string","description":"The step a person must complete out of band."},"url":{"description":"Where to send the human to complete the step, when a destination exists.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"pollUrl":{"description":"Where to POST the continuationToken to poll this flow: `/v1/actions/resume`.","type":"string","format":"uri"},"continuationToken":{"type":"string","minLength":1,"description":"Short-lived, principal-scoped capability for this flow. Present it to POST /v1/actions/resume to poll and complete. Single-use on completion. A secret: never log it."},"pollAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minimum seconds to wait before calling resume again."},"expiresAt":{"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))$","description":"Deadline for the human step. Resume after this returns terminal `expired`; the token survives a short grace so resume can say so, but the flow can no longer be redeemed."}},"required":["actionType","instruction","continuationToken","pollAfterSeconds","expiresAt"],"additionalProperties":false}},"required":["data","requiresAction"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]},"get":{"operationId":"listApprovals","summary":"List approvals","description":"Returns same-user approvals: pending by default (elevations ranked above routine resumes), or scope=decided for recent receipts. Pass teamId to enforce team visibility on the server.","security":[{"sessionCookie":[]}],"parameters":[{"name":"teamId","in":"query","required":false,"schema":{"description":"Enforce this team's visibility rules on the server before returning.","type":"string","minLength":1}},{"name":"scope","in":"query","required":false,"schema":{"description":"Which approvals to return. Defaults to the pending ones.","type":"string","enum":["pending","decided"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"decisions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"href":{"type":"string"},"kind":{"type":"string","enum":["confirmation","elevation","resume"]},"purposeCode":{"type":"string"},"grantId":{"type":"string"},"rationale":{"type":"string"},"requestedScopes":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["approved","denied","expired","completed","executing"]},"decidedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"expiresAt":{"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))$"},"createdAt":{"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","title","description","href","kind","grantId","rationale","requestedScopes","expiresAt","createdAt"],"additionalProperties":false}}},"required":["decisions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/approvals/{approvalId}":{"get":{"operationId":"getApproval","summary":"Get one approval","description":"Returns the immutable action terms, rationale, grant, and current state only to the user who owns the requesting grant.","security":[{"sessionCookie":[]}],"parameters":[{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["confirmation","elevation"]},"purposeCode":{"type":"string"},"rationale":{"type":"string"},"requestedScopes":{"type":"array","items":{"type":"string"}},"resource":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"quote":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","executing","completed","denied","expired"]},"grant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"baselineScopes":{"type":"array","items":{"type":"string"}},"authorizationLevel":{"type":"string","enum":["user","team"]},"teamScope":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"teams"},"teamIds":{"type":"array","items":{"type":"string"}}},"required":["mode","teamIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"none"}},"required":["mode"],"additionalProperties":false}]}},"required":["id","name","baselineScopes","authorizationLevel","teamScope"],"additionalProperties":false},"result":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"transfer":{"anyOf":[{"type":"object","properties":{"space":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"from":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"to":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"required":["space","from","to"],"additionalProperties":false},{"type":"null"}]},"team":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"expiresAt":{"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))$"},"createdAt":{"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))$"},"decidedAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["id","kind","purposeCode","rationale","requestedScopes","resource","quote","status","grant","result","expiresAt","createdAt","decidedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/approvals/{approvalId}/approve":{"post":{"security":[{"sessionCookie":[]}],"operationId":"approveApproval","summary":"Approve an agent decision","description":"Only the user who owns the requesting grant can approve. Repeating this returns the same receipt, and an elevation returns its lease.","parameters":[{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["completed","denied","expired"]},"result":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/approvals/{approvalId}/deny":{"post":{"security":[{"sessionCookie":[]}],"operationId":"denyApproval","summary":"Deny an agent decision","description":"Only the user who owns the requesting grant can deny. Denial is terminal: the agent cannot clear it by asking again.","parameters":[{"name":"approvalId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["completed","denied","expired"]},"result":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/actions/resume":{"post":{"operationId":"resumeAction","summary":"Resume a flow blocked on a human step","description":"Polls a flow that returned a `requiresAction` envelope, using its continuation token. Returns `pending` (keep polling), `completed` (the one-time result is redeemed), or `denied`/`expired`. This is one generalized path for every `requiresAction` flow.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"continuationToken":{"type":"string","minLength":1,"maxLength":4096,"description":"Continuation token from a `requiresAction` envelope. Body-only, never a URL."}},"required":["continuationToken"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"continuationToken":{"type":"string","minLength":1,"maxLength":4096,"description":"Continuation token from a `requiresAction` envelope. Body-only, never a URL."}},"required":["continuationToken"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"continuationToken":{"type":"string","minLength":1,"maxLength":4096,"description":"Continuation token from a `requiresAction` envelope. Body-only, never a URL."}},"required":["continuationToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"pending"},"requiresAction":{"type":"object","properties":{"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"instruction":{"type":"string","description":"The step a person must complete out of band."},"url":{"description":"Where to send the human to complete the step, when a destination exists.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"pollUrl":{"description":"Where to POST the continuationToken to poll this flow: `/v1/actions/resume`.","type":"string","format":"uri"},"continuationToken":{"type":"string","minLength":1,"description":"Short-lived, principal-scoped capability for this flow. Present it to POST /v1/actions/resume to poll and complete. Single-use on completion. A secret: never log it."},"pollAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Minimum seconds to wait before calling resume again."},"expiresAt":{"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))$","description":"Deadline for the human step. Resume after this returns terminal `expired`; the token survives a short grace so resume can say so, but the flow can no longer be redeemed."}},"required":["actionType","instruction","continuationToken","pollAfterSeconds","expiresAt"],"additionalProperties":false,"description":"The human step is still incomplete. Wait `pollAfterSeconds` and resume again with the same token."}},"required":["status","requiresAction"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"completed"},"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"result":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The flow returns this result one time. Device authorization returns an API key. Confirmation returns an action receipt. Elevation returns a lease receipt."}},"required":["status","actionType","result"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"denied"},"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"message":{"type":"string"}},"required":["status","actionType","message"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","const":"expired"},"actionType":{"type":"string","enum":["device_authorization","confirmation","elevation"],"description":"Stable identifier for the out-of-band step that blocks the flow."},"message":{"type":"string"}},"required":["status","actionType","message"],"additionalProperties":false}],"description":"Consistent resume result across flows. Keep polling on `pending`. Read the one-time payload on `completed`. Stop on `denied` or `expired`."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Agent"]}},"/v1/spaces/{spaceId}/content/sync/{bindingId}":{"get":{"operationId":"getSpaceContentSourceConflict","summary":"Compare source and WordPress content","description":"Reads the common base, current source, and current WordPress document with the revisions required to resolve a conflict.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"bindingId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"type":"string","minLength":1,"maxLength":1000},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"baseText":{"type":"string","maxLength":1000000},"wordpressText":{"type":"string","maxLength":1000000},"wordpressDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"sourceText":{"type":"string","maxLength":1000000},"sourceRevision":{"type":"string","minLength":1,"maxLength":512}},"required":["bindingId","postId","source","baseRevision","baseText","wordpressText","wordpressDigest","wordpressRevisionId","sourceText","sourceRevision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/sync/resolve":{"post":{"operationId":"resolveSpaceContentSourceConflict","summary":"Resolve a content synchronization conflict","description":"Saves the chosen document only while source and WordPress still match the supplied revisions, then queues the normal source commit and build. Changed revisions return a conflict without overwriting either side.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"expectedBaseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedWordpressDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":1000000}},"required":["bindingId","operationId","expectedBaseRevision","expectedWordpressDigest","expectedSourceRevision","text"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"expectedBaseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedWordpressDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":1000000}},"required":["bindingId","operationId","expectedBaseRevision","expectedWordpressDigest","expectedSourceRevision","text"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"expectedBaseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedWordpressDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"expectedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":1000000}},"required":["bindingId","operationId","expectedBaseRevision","expectedWordpressDigest","expectedSourceRevision","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"status":{"type":"string","const":"queued"}},"required":["postId","bindingId","operationId","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/media/{attachmentId}":{"get":{"operationId":"getSpaceContentMedia","summary":"Read a WordPress attachment","description":"Returns attachment bytes after checking space ownership and WordPress read permissions. The optional size names a WordPress image size. Responses are private and must not be cached.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:read"]}],"responses":{"200":{"description":"Attachment bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"size","in":"query","required":false,"schema":{"type":"string","maxLength":100,"pattern":"^[a-zA-Z0-9_-]+$"}}],"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/sync":{"get":{"operationId":"getSpaceContentSyncStatus","summary":"Read content synchronization and publication receipts","description":"Lists acknowledged source changes, conflicts, and associated build and live-version status. A clean receipt does not imply that later WordPress edits have synchronized.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"source":{"type":"string","minLength":1,"maxLength":1000},"state":{"type":"string","enum":["clean","conflicted"]},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"commitSha":{"type":["string","null"]},"conflict":{"anyOf":[{"type":"object","properties":{"code":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"occurredAt":{"type":["string","null"]}},"required":["code","details","occurredAt"],"additionalProperties":false},{"type":"null"}]},"deployment":{"anyOf":[{"type":"object","properties":{"buildId":{"type":"string"},"status":{"type":"string","enum":["waiting_for_source","uploading_source","queued","running","succeeded","failed","canceled","skipped"]},"versionId":{"type":["string","null"]},"live":{"type":"boolean"}},"required":["buildId","status","versionId","live"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"type":"string"}},"required":["bindingId","postId","source","state","wordpressRevisionId","baseRevision","commitSha","conflict","deployment","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/conversions":{"post":{"operationId":"convertSpaceContentSource","summary":"Convert a code-authored document to editable blocks","description":"Queues an explicit source ownership conversion. Preserves the original code in source history and publishes the editable document through the normal source commit and build pipeline. Reuse the operation ID when retrying the same conversion.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"}},"required":["postId","bindingId","operationId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"}},"required":["postId","bindingId","operationId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"}},"required":["postId","bindingId","operationId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"postId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"status":{"type":"string","const":"queued"}},"required":["postId","bindingId","operationId","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/rest":{"post":{"operationId":"requestSpaceContentRest","summary":"Call the space's WordPress REST API","description":"Runs a relative WordPress REST request as the authenticated actor. Reads require spaces:read; mutations require spaces:write. WordPress applies its endpoint permissions. Returns the WordPress status, headers, and body, including pagination and errors.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","minLength":1,"maxLength":8192},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"upload":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\r\\n\\u0000]+$"},"contentType":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9!#$&^_.+-]+\\/[a-zA-Z0-9!#$&^_.+-]+$"},"base64":{"type":"string","maxLength":22369624}},"required":["filename","contentType","base64"],"additionalProperties":false}},"required":["method","path"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","minLength":1,"maxLength":8192},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"upload":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\r\\n\\u0000]+$"},"contentType":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9!#$&^_.+-]+\\/[a-zA-Z0-9!#$&^_.+-]+$"},"base64":{"type":"string","maxLength":22369624}},"required":["filename","contentType","base64"],"additionalProperties":false}},"required":["method","path"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"path":{"type":"string","minLength":1,"maxLength":8192},"body":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"upload":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\r\\n\\u0000]+$"},"contentType":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9!#$&^_.+-]+\\/[a-zA-Z0-9!#$&^_.+-]+$"},"base64":{"type":"string","maxLength":22369624}},"required":["filename","contentType","base64"],"additionalProperties":false}},"required":["method","path"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"status":{"type":"integer","minimum":100,"maximum":599},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["status","headers","body"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/admin-session":{"post":{"operationId":"launchSpaceContentAdmin","summary":"Open the content editor","description":"Creates a one-use launch URL for the Spacefast-managed WordPress editor. `screen` names which Content screen the launch lands on; omitting it opens classic WordPress. `path` selects a classic /wp-admin/ destination.","security":[{"sessionCookie":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"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":["url","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/admin-link":{"post":{"operationId":"createSpaceContentAdminLink","summary":"Create a content dashboard sign-in link","description":"Returns a one-use link that signs a person in to the Space's WordPress content dashboard. The link opens a page with one button. The click signs the person in as the WordPress `role` in the result. The link expires 10 minutes after creation. An empty body lands on the Zero collections screen. `screen` selects a Zero screen. `path` selects a classic /wp-admin/ page. The link signs in the person behind the credential: the signed-in user, or the person who created a team API key. Other credentials get `content_admin_person_required`. Managed content must be available for the team; otherwise the call fails with `feature_unavailable`.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"screen":{"type":"string","enum":["collections","users"]},"path":{"type":"string","maxLength":8192}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"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))$"},"role":{"type":"string","enum":["administrator","editor"]}},"required":["url","expiresAt","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/sync/reconcile":{"post":{"operationId":"reconcileSpaceContentSync","summary":"Reconcile a source file with its WordPress document","description":"Three-way reconciles one bound source file against the post it backs, using the stored common base. The binding's format decides the serializer — Markdown or HTML. Answers with the new ledger, and with the text to write back when WordPress moved ahead.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"initial"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state"],"additionalProperties":false},{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"bound"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state","baseRevision"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"initial"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state"],"additionalProperties":false},{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"bound"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state","baseRevision"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"initial"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state"],"additionalProperties":false},{"type":"object","properties":{"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"text":{"type":"string","maxLength":1000000},"observedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"state":{"type":"string","const":"bound"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["bindingId","source","text","observedSourceRevision","operationId","state","baseRevision"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync"},"version":{"type":"number","const":1},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"ledger":{"type":"object","properties":{"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"format":{"type":"string","enum":["md","html","blocks","tsx"]},"baseText":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"blocksDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"metadataDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serializerVersion":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastDirection":{"type":"string","enum":["push","pull"]}},"required":["version","bindingId","source","format","baseText","textDigest","blocksDigest","wordpressRevisionId","serializerVersion","revision","lastDirection"],"additionalProperties":false},"status":{"type":"string","const":"created"}},"required":["format","version","operationId","ledger","status"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync"},"version":{"type":"number","const":1},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"ledger":{"type":"object","properties":{"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"format":{"type":"string","enum":["md","html","blocks","tsx"]},"baseText":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"blocksDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"metadataDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serializerVersion":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastDirection":{"type":"string","enum":["push","pull"]}},"required":["version","bindingId","source","format","baseText","textDigest","blocksDigest","wordpressRevisionId","serializerVersion","revision","lastDirection"],"additionalProperties":false},"status":{"type":"string","const":"unchanged"}},"required":["format","version","operationId","ledger","status"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync"},"version":{"type":"number","const":1},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"ledger":{"type":"object","properties":{"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"format":{"type":"string","enum":["md","html","blocks","tsx"]},"baseText":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"blocksDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"metadataDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serializerVersion":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastDirection":{"type":"string","enum":["push","pull"]}},"required":["version","bindingId","source","format","baseText","textDigest","blocksDigest","wordpressRevisionId","serializerVersion","revision","lastDirection"],"additionalProperties":false},"status":{"type":"string","const":"pushed"}},"required":["format","version","operationId","ledger","status"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync"},"version":{"type":"number","const":1},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"ledger":{"type":"object","properties":{"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"format":{"type":"string","enum":["md","html","blocks","tsx"]},"baseText":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"blocksDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"metadataDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serializerVersion":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastDirection":{"type":"string","enum":["push","pull"]}},"required":["version","bindingId","source","format","baseText","textDigest","blocksDigest","wordpressRevisionId","serializerVersion","revision","lastDirection"],"additionalProperties":false},"status":{"type":"string","const":"pulled"},"sourceWrite":{"type":"object","properties":{"state":{"type":"string","const":"prepared"},"source":{"type":"string","minLength":1,"maxLength":1000},"expectedSourceRevision":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["state","source","expectedSourceRevision","text","textDigest"],"additionalProperties":false}},"required":["format","version","operationId","ledger","status","sourceWrite"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/content/sync/acknowledge":{"post":{"operationId":"acknowledgeSpaceContentSync","summary":"Acknowledge a prepared source write","description":"Closes a reconciliation that prepared a source write, once the caller has landed those bytes. Refused when the ledger moved on, so a file nobody reconciled is never adopted as the common base.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync-ack"},"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["format","version","bindingId","operationId","baseRevision"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync-ack"},"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["format","version","bindingId","operationId","baseRevision"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync-ack"},"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"baseRevision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["format","version","bindingId","operationId","baseRevision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"format":{"type":"string","const":"spacefast.content-sync-ack-receipt"},"version":{"type":"number","const":1},"status":{"type":"string","const":"acknowledged"},"operationId":{"type":"string","pattern":"^(op_)[A-Za-z0-9]+$"},"ledger":{"type":"object","properties":{"version":{"type":"number","const":1},"bindingId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"source":{"type":"string","minLength":1,"maxLength":1000},"format":{"type":"string","enum":["md","html","blocks","tsx"]},"baseText":{"type":"string","maxLength":1000000},"textDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"blocksDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"metadataDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"wordpressRevisionId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"serializerVersion":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastDirection":{"type":"string","enum":["push","pull"]}},"required":["version","bindingId","source","format","baseText","textDigest","blocksDigest","wordpressRevisionId","serializerVersion","revision","lastDirection"],"additionalProperties":false}},"required":["format","version","status","operationId","ledger"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users/settings":{"get":{"operationId":"getSpaceUsersSettings","summary":"Read app sign-in settings","description":"Returns whether visitors can create accounts and sign in to this Space's app, and which sign-in methods are on (email code, Google, WordPress.com/Gravatar, Spacefast). Also returns `settingsDigest` for the next update and the Google redirect URI for a direct Google client. Never returns the Google client secret. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"availability":{"type":"object","properties":{"google":{"type":"object","properties":{"managed":{"type":"boolean"},"direct":{"type":"boolean"}},"required":["managed","direct"],"additionalProperties":false},"gravatar":{"type":"boolean"},"spacefast":{"type":"boolean","const":true}},"required":["google","gravatar","spacefast"],"additionalProperties":false},"settingsDigest":{"type":"string"},"googleCallbackUrl":{"type":"string","format":"uri"}},"required":["settings","availability","settingsDigest","googleCallbackUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"patch":{"operationId":"updateSpaceUsersSettings","summary":"Update app sign-in settings","description":"Turns visitor sign-in for this Space's app on or off and chooses its sign-in methods. Send the complete `settings` with `baseSettingsDigest` from the latest read; a stale digest refuses the write. For Google mode `direct`, `directGoogleSecret` saves the client secret write-only and `null` removes it; it is never returned. Only change sign-in at the user's request. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"baseSettingsDigest":{"type":"string","minLength":1,"maxLength":256},"directGoogleSecret":{"description":"Write-only direct Google client secret. Null removes it. Never returned.","anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"required":["settings","baseSettingsDigest"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"baseSettingsDigest":{"type":"string","minLength":1,"maxLength":256},"directGoogleSecret":{"description":"Write-only direct Google client secret. Null removes it. Never returned.","anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"required":["settings","baseSettingsDigest"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"baseSettingsDigest":{"type":"string","minLength":1,"maxLength":256},"directGoogleSecret":{"description":"Write-only direct Google client secret. Null removes it. Never returned.","anyOf":[{"type":"string","minLength":1,"maxLength":4096},{"type":"null"}]}},"required":["settings","baseSettingsDigest"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"settings":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"availability":{"type":"object","properties":{"google":{"type":"object","properties":{"managed":{"type":"boolean"},"direct":{"type":"boolean"}},"required":["managed","direct"],"additionalProperties":false},"gravatar":{"type":"boolean"},"spacefast":{"type":"boolean","const":true}},"required":["google","gravatar","spacefast"],"additionalProperties":false},"settingsDigest":{"type":"string"},"googleCallbackUrl":{"type":"string","format":"uri"}},"required":["settings","availability","settingsDigest","googleCallbackUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users":{"get":{"operationId":"listSpaceUsers","summary":"List app users","description":"Lists the visitor accounts of this Space's app by page: `page`, `perPage` (default 20, at most 100), and an optional name or email `search`. Each account shows its status, email addresses, and linked sign-in providers. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"perPage","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"perPage":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string","enum":["active","suspended","deletion_requested","deleted"]},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","email","primary","verifiedAt"],"additionalProperties":false}},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"issuer":{"type":"string"}},"required":["id","issuer"],"additionalProperties":false}}},"required":["id","subject","displayName","status","emails","providers"],"additionalProperties":false}}},"required":["page","perPage","users"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users/{userId}":{"get":{"operationId":"getSpaceUser","summary":"Read an app user","description":"Returns one visitor account of this Space's app by its numeric id: status, email addresses, and linked sign-in providers. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string","enum":["active","suspended","deletion_requested","deleted"]},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","email","primary","verifiedAt"],"additionalProperties":false}},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"issuer":{"type":"string"}},"required":["id","issuer"],"additionalProperties":false}}},"required":["id","subject","displayName","status","emails","providers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"patch":{"operationId":"setSpaceUserSuspended","summary":"Suspend or reactivate an app user","description":"Suspends (`suspended: true`) or reactivates (`suspended: false`) one visitor account of this Space's app. A suspended account cannot sign in to the app until it is reactivated. Returns the updated account. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"suspended":{"type":"boolean"}},"required":["suspended"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"suspended":{"type":"boolean"}},"required":["suspended"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"suspended":{"type":"boolean"}},"required":["suspended"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"subject":{"type":"string"},"displayName":{"type":"string"},"status":{"type":"string","enum":["active","suspended","deletion_requested","deleted"]},"emails":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"primary":{"type":"boolean"},"verifiedAt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","email","primary","verifiedAt"],"additionalProperties":false}},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"issuer":{"type":"string"}},"required":["id","issuer"],"additionalProperties":false}}},"required":["id","subject","displayName","status","emails","providers"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users/{userId}/sessions":{"get":{"operationId":"listSpaceUserSessions","summary":"List app user sessions","description":"Lists the app sign-in sessions of one visitor account: label, created and expiry times, and when each was revoked. Never returns session credentials. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"createdAt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"revokedAt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["id","label","createdAt","expiresAt","revokedAt"],"additionalProperties":false}}},"required":["sessions"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users/{userId}/sessions/revoke":{"post":{"operationId":"revokeSpaceUserSessions","summary":"Revoke app user sessions","description":"Signs one visitor account out of this Space's app. Pass `sessionId` from listSpaceUserSessions to end one session, or omit it to end all of the account's sessions. The person can sign in again unless the account is suspended. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sessionId":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revoked":{"type":"boolean","const":true}},"required":["revoked"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/users/{userId}/deletion":{"post":{"operationId":"completeSpaceUserDeletion","summary":"Complete a requested app account deletion","description":"Erases a visitor account that asked to be deleted, with its credentials, while keeping its content as anonymous. Repeating a completed deletion is safe. App accounts sign in to the published Space only; they never grant team or Space access. Requires permission to manage the Space.","security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"userId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/zero/token":{"post":{"operationId":"createSpaceRestApiToken","summary":"Create a short-lived token for a Space's REST API","description":"Returns a bearer token, valid for `ttlSeconds`, for calling this Space's own WordPress REST API with the access of one of its machine credentials (`credentialId`). Authenticate normally; you never need that credential's secret. Send the token only to the returned `endpoint`, and keep it out of logs and chat. The Space re-checks the credential's Grant on every request, so the returned capabilities and role are what to expect, not a promise.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credentialId":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$","description":"A live machine credential of this Space. Its canonical scoped Grant is the authority the Space's own runtime re-derives the WordPress role from."},"ttlSeconds":{"default":900,"description":"How long the bearer stays valid, in seconds.","type":"integer","minimum":60,"maximum":3600}},"required":["credentialId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credentialId":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$","description":"A live machine credential of this Space. Its canonical scoped Grant is the authority the Space's own runtime re-derives the WordPress role from."},"ttlSeconds":{"default":900,"description":"How long the bearer stays valid, in seconds.","type":"integer","minimum":60,"maximum":3600}},"required":["credentialId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credentialId":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$","description":"A live machine credential of this Space. Its canonical scoped Grant is the authority the Space's own runtime re-derives the WordPress role from."},"ttlSeconds":{"default":900,"description":"How long the bearer stays valid, in seconds.","type":"integer","minimum":60,"maximum":3600}},"required":["credentialId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"token":{"type":"string","minLength":1,"description":"Send as `X-SF-Authorization: Bearer ` to the Space's own REST surface — the plain Authorization header belongs to the customer's application and passes through untouched."},"expiresAt":{"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))$"},"host":{"type":"string","minLength":1,"description":"The serving host this bearer is bound to."},"endpoint":{"type":"string","format":"uri","description":"The Space's WordPress REST root."},"credentialId":{"type":"string","pattern":"^(mch_)[A-Za-z0-9]+$"},"capabilities":{"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"role":{"anyOf":[{"type":"string","enum":["subscriber","editor","administrator"]},{"type":"null"}],"description":"The WordPress role those capabilities project to, or null when the request would reach WordPress as nobody."}},"required":["token","expiresAt","host","endpoint","credentialId","capabilities","role"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/zero/abilities":{"get":{"operationId":"listSpaceZeroAbilities","summary":"List a Space's content Abilities","description":"Lists the content-model Abilities the Space's live version publishes, empty when it declares no content model. The `zero-wp-users` and `zero-storage` Ability categories are not listed here: they are registered by the Space's own runtime, and the Space's WordPress REST surface enumerates them.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"The name WordPress publishes the Ability under."},"id":{"type":"string","minLength":1,"description":"The Ability's product id, before flattening by the Abilities API — `content.projects.list` for `zero/content-projects-list`."},"category":{"type":"string","minLength":1},"mode":{"type":"string","enum":["read","write"]},"requires":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"grant"},"capabilities":{"type":"array","items":{"type":"string","minLength":1},"description":"Grant capabilities the caller must hold, all of them."}},"required":["kind","capabilities"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"capability":{"type":"string","minLength":1,"description":"The WordPress capability the Ability's permission callback asks for."}},"required":["kind","capability"],"additionalProperties":false}]},"inputSchema":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}],"description":"JSON Schema for the Ability's input, or null when it declares none."},"outputSchema":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"null"}],"description":"JSON Schema for the Ability's output, or null when it declares none."}},"required":["name","id","category","mode","requires","inputSchema","outputSchema"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/zero/content-model":{"get":{"operationId":"getSpaceZeroContentModel","summary":"Read a Space's live content model","description":"Returns the compiled content model the Space's live version publishes, with its schema table and revision. This is the build input `sf zero types` generates types from; for browsing what a Space can do, list its Abilities instead. A Space with no live version, or one that declares no content model, answers with nulls.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"versionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"The live version this content model came from, or null when there is none."},"model":{"anyOf":[{"type":"object","properties":{"format":{"type":"string","const":"spacefast.zero-wordpress"},"version":{"type":"number","const":1},"revision":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"schemas":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"schema":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["id","sha256","schema"],"additionalProperties":false}},"wordpress":{"type":"object","properties":{"format":{"type":"string","const":"spacefast.wordpress-content-model"},"version":{"type":"number","const":1},"resources":{"minItems":3,"maxItems":53,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"label":{"type":"string","minLength":1,"maxLength":160},"kind":{"type":"string","enum":["posts","pages","media","collection"]},"fields":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"label":{"type":"string","minLength":1,"maxLength":160},"required":{"type":"boolean"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"text"},"multiline":{"type":"boolean"},"maxLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","multiline","maxLength"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"number"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"datetime"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"blocks"},"allowed":{"anyOf":[{"type":"string","const":"any"},{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}}]}},"required":["kind","allowed"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"media"},"multiple":{"type":"boolean"}},"required":["kind","multiple"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"reference"},"target":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"multiple":{"type":"boolean"}},"required":["kind","target","multiple"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"enum"},"values":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":160}},"multiple":{"type":"boolean"}},"required":["kind","values","multiple"],"additionalProperties":false}]}},"required":["id","name","label","required","value"],"additionalProperties":false}},"publicRead":{"type":"boolean"}},"required":["id","name","label","kind","fields","publicRead"],"additionalProperties":false}}},"required":["format","version","resources"],"additionalProperties":false},"tables":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"columns":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"nullable":{"type":"boolean"},"value":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"string"},"maxLength":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["kind","maxLength"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"number"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"boolean"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"datetime"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"json"}},"required":["kind"],"additionalProperties":false}]}},"required":["id","name","nullable","value"],"additionalProperties":false}},"indexes":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"fields":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"unique":{"type":"boolean"}},"required":["id","fields","unique"],"additionalProperties":false}}},"required":["id","name","columns","indexes"],"additionalProperties":false}},"abilities":{"maxItems":500,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"input":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"output":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"permits":{"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"reads":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"writes":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"exposure":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"named"},"named":{"type":"boolean","const":true}},"required":["kind","named"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"routed"},"named":{"type":"boolean","const":true},"route":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"admission":{"type":"string","enum":["authenticated","public"]}},"required":["id","method","path","admission"],"additionalProperties":false}},"required":["kind","named","route"],"additionalProperties":false}]},"cache":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"private"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400}},"required":["kind","maxAgeSeconds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"public"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400},"staleWhileRevalidateSeconds":{"type":"integer","minimum":0,"maximum":604800}},"required":["kind","maxAgeSeconds","staleWhileRevalidateSeconds"],"additionalProperties":false}]},"kind":{"type":"string","const":"query"},"mode":{"type":"string","const":"read"}},"required":["id","input","output","permits","reads","writes","exposure","cache","kind","mode"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"input":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"output":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"permits":{"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"reads":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"writes":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"exposure":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"named"},"named":{"type":"boolean","const":true}},"required":["kind","named"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"routed"},"named":{"type":"boolean","const":true},"route":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"admission":{"type":"string","enum":["authenticated","public"]}},"required":["id","method","path","admission"],"additionalProperties":false}},"required":["kind","named","route"],"additionalProperties":false}]},"cache":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"private"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400}},"required":["kind","maxAgeSeconds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"public"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400},"staleWhileRevalidateSeconds":{"type":"integer","minimum":0,"maximum":604800}},"required":["kind","maxAgeSeconds","staleWhileRevalidateSeconds"],"additionalProperties":false}]},"kind":{"type":"string","const":"mutation"},"mode":{"type":"string","const":"write"}},"required":["id","input","output","permits","reads","writes","exposure","cache","kind","mode"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"input":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"output":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false},"permits":{"maxItems":5,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write","content.publish","access.manage"]}},"reads":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"writes":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^(?:content|table)\\.[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"}},"exposure":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"named"},"named":{"type":"boolean","const":true}},"required":["kind","named"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"routed"},"named":{"type":"boolean","const":true},"route":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"admission":{"type":"string","enum":["authenticated","public"]}},"required":["id","method","path","admission"],"additionalProperties":false}},"required":["kind","named","route"],"additionalProperties":false}]},"cache":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"private"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400}},"required":["kind","maxAgeSeconds"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"public"},"maxAgeSeconds":{"type":"integer","minimum":0,"maximum":86400},"staleWhileRevalidateSeconds":{"type":"integer","minimum":0,"maximum":604800}},"required":["kind","maxAgeSeconds","staleWhileRevalidateSeconds"],"additionalProperties":false}]},"kind":{"type":"string","const":"endpoint"},"mode":{"type":"string","enum":["read","write"]}},"required":["id","input","output","permits","reads","writes","exposure","cache","kind","mode"],"additionalProperties":false}]}},"pages":{"maxItems":10000,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sourceKey":{"type":"string","minLength":1,"maxLength":512},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"},"title":{"type":"string","minLength":1,"maxLength":500},"blockName":{"type":"string","const":"zero/component"},"componentId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"props":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["id","sha256"],"additionalProperties":false}},"required":["id","sourceKey","path","title","blockName","componentId","props"],"additionalProperties":false}},"hooks":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"runtime":{"type":"string","enum":["php","quickjs"]},"artifact":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"export":{"type":"string","minLength":1,"maxLength":256}},"required":["id","runtime","artifact","export"],"additionalProperties":false}},"syncBindings":{"maxItems":10000,"type":"array","items":{}},"materializations":{"default":[],"maxItems":100,"type":"array","items":{"type":"object","properties":{"resourceId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"fieldId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$"},"directory":{"type":"string","minLength":1,"maxLength":512},"suffix":{"type":"string","minLength":2,"maxLength":16},"format":{"type":"string","enum":["md","html","blocks","tsx"]}},"required":["resourceId","fieldId","directory","suffix","format"],"additionalProperties":false}}},"required":["format","version","revision","schemas","wordpress","tables","abilities","pages","hooks","syncBindings","materializations"],"additionalProperties":false},{"type":"null"}],"description":"The compiled content model release, or null when the live version declares none."}},"required":["versionId","model"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceRef}/connectors":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"listSpaceConnectorBindings","summary":"List a Space's connector roles","description":"Returns the live capsule's roles with their bindings and connection status.","parameters":[{"name":"spaceRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"bindings":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"},"as":{"type":"string","enum":["team","owner","visitor"]},"connector":{"type":"string","minLength":1},"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},{"type":"null"}]},"visitorConnections":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false},"boundByUserId":{"type":["string","null"]},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["role","as","connection","boundByUserId","createdAt"],"additionalProperties":false}},"access":{"type":"string","enum":["private","team","public"]}},"required":["bindings","access"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceRef}/users/connectors":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"listVisitorConnectionUsers","summary":"List visitor connection counts","description":"Returns counts and roles per Space user. Connected account identities and connection ids are private.","parameters":[{"name":"spaceRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"userRef":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"roles":{"type":"array","items":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"}}},"required":["userRef","count","roles"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceRef}/users/{userRef}/connectors/{role}":{"delete":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"revokeVisitorConnection","summary":"Revoke a visitor connection","description":"Disconnects a Space user's account for one role.","parameters":[{"name":"spaceRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"role","in":"path","required":true,"schema":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"}},{"name":"userRef","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceRef}/connectors/{role}":{"put":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"bindSpaceConnector","summary":"Bind a connector role","description":"Binds a live capsule role to an eligible connection owned by the team or caller.","parameters":[{"name":"spaceRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"role","in":"path","required":true,"schema":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","minLength":1}},"required":["connectionId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","minLength":1}},"required":["connectionId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","minLength":1}},"required":["connectionId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"role":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"},"as":{"type":"string","enum":["team","owner","visitor"]},"connector":{"type":"string","minLength":1},"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Connection id (`cxn_`). This is also the first segment of every tool address it owns."},"connector":{"type":"string","description":"Slug of the connector this connection authenticates."},"owner":{"type":"string","enum":["team","personal"],"description":"`team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection."},"serving":{"default":false,"type":"boolean"},"displayName":{"type":"string","description":"What people call this connection, e.g. \"Linear (support)\"."},"description":{"description":"Agent-visible note on what this connection is for. Shown to models choosing between several.","type":["string","null"]},"status":{"type":"string","enum":["pending_authorization","active","degraded","needs_reauth","revoked"],"description":"Derived connection state. Never stored, so it cannot drift from the credential it describes."},"identityLabel":{"description":"Account label reported by the provider, when it identifies itself. Null until the first successful probe.","type":["string","null"]},"credentialConfigured":{"type":"boolean","description":"Whether a usable credential is stored. The credential itself is never returned by any endpoint."},"authMethod":{"description":"Slug of the connector auth method this connection used.","type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"},"description":"Scopes actually granted, when the provider reports them."},"scopesKnown":{"description":"False when the provider did not report the granted scope set.","type":"boolean"},"isDefault":{"type":"boolean","description":"Whether this is the connection an agent gets when it names the connector alone."},"toolCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Tools reachable through this connection at the last sync."},"createdBy":{"description":"User who connected it; null for first-party connections Spacefast owns.","type":["string","null"]},"lastCheckedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Last health probe."},"revokedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When it was disconnected. The credential is purged; the row tombstones."},"createdAt":{"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))$"},"updatedAt":{"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","connector","owner","serving","displayName","description","status","identityLabel","credentialConfigured","authMethod","scopes","isDefault","toolCount","createdBy","lastCheckedAt","revokedAt","createdAt","updatedAt"],"additionalProperties":false,"description":"A configured instance of a connector, with a credential the control plane holds and never hands out."},{"type":"null"}]},"visitorConnections":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"],"additionalProperties":false},"boundByUserId":{"type":["string","null"]},"createdAt":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["role","as","connection","boundByUserId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"delete":{"security":[{"bearerAuth":[]},{"oauth2":["connectors:write"]}],"operationId":"unbindSpaceConnector","summary":"Unbind a connector role","description":"Removes a Space binding without disconnecting the account.","parameters":[{"name":"spaceRef","in":"path","required":true,"schema":{"type":"string"}},{"name":"role","in":"path","required":true,"schema":{"type":"string","maxLength":64,"pattern":"^[a-z][a-zA-Z0-9]*$"}},{"name":"team","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"null"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/rules":{"get":{"operationId":"listSpaceTrafficRules","summary":"List a space's traffic rules","description":"Returns the space's traffic rules in the order the edge reads them, each with where it was declared and what the edge last said about it. `collapsed` names the declared rules the edge never got because an earlier rule already covers them. The edge is read only for the quota count, so an edge that does not answer still gets you the rules, with `quota.stale` set and `quota.limit` null.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"$ref":"#/components/schemas/TrafficRules"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/rules/validate":{"post":{"x-spacefast-read-only":true,"operationId":"validateSpaceTrafficRules","summary":"Check traffic rules before publishing them","description":"Checks the rules against the rule grammar and then against the edge, and returns every problem with the field it is in. Writes nothing. A rule the grammar refuses is reported here as an issue, so one request answers for the whole list.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Traffic rules to check before you publish them.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firewall":{"description":"Firewall rules to check, in the shape `config.firewall` takes.","maxItems":50,"type":"array","items":{}},"cache":{"type":"object","properties":{"bypass":{"description":"Cache-bypass rules to check, in the shape `config.cache.bypass` takes.","maxItems":50,"type":"array","items":{}}},"additionalProperties":false}},"additionalProperties":false,"description":"Traffic rules to check before you publish them."}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firewall":{"description":"Firewall rules to check, in the shape `config.firewall` takes.","maxItems":50,"type":"array","items":{}},"cache":{"type":"object","properties":{"bypass":{"description":"Cache-bypass rules to check, in the shape `config.cache.bypass` takes.","maxItems":50,"type":"array","items":{}}},"additionalProperties":false}},"additionalProperties":false,"description":"Traffic rules to check before you publish them."}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firewall":{"description":"Firewall rules to check, in the shape `config.firewall` takes.","maxItems":50,"type":"array","items":{}},"cache":{"type":"object","properties":{"bypass":{"description":"Cache-bypass rules to check, in the shape `config.cache.bypass` takes.","maxItems":50,"type":"array","items":{}}},"additionalProperties":false}},"additionalProperties":false,"description":"Traffic rules to check before you publish them."}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"valid":{"type":"boolean","description":"True when every rule is one the edge accepts."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/TrafficRuleIssue"},"description":"Every problem found, in rule order."}},"required":["valid","issues"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/rules/pause":{"post":{"operationId":"pauseSpaceTrafficRules","summary":"Pause a space's traffic rules","description":"Parks every rule at the edge and keeps the space paused, so a rule it declares later is parked as it arrives. The space serves as if it declared none. The rules are kept, so resume puts them back without the author writing them again.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"$ref":"#/components/schemas/TrafficRules"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/spaces/{spaceId}/rules/resume":{"post":{"operationId":"resumeSpaceTrafficRules","summary":"Resume a space's traffic rules","description":"Puts every parked rule back into the state it was paused from. Safe to call on a space that is not paused.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"$ref":"#/components/schemas/TrafficRules"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/rules/catalog":{"get":{"operationId":"getTrafficRuleCatalog","summary":"Get the traffic rule catalog","description":"Returns the request attributes a traffic rule can match on, the comparisons each one makes, and what the platform caps. The same for every space. Read this before you write a rule: a field only makes the comparisons listed for it.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"$ref":"#/components/schemas/TrafficRuleCatalog"}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/teams/{teamId}/labels":{"get":{"operationId":"listTeamLabels","summary":"List a team's labels","description":"Returns every label the team has, ordered by name.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(lbl_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the label belongs to."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","color","createdAt","updatedAt"],"additionalProperties":false},"description":"The team's labels, ordered by name."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"operationId":"createTeamLabel","summary":"Create a team label","description":"Creates a label for the team. Names are unique within the team, ignoring case. Leave the color out and the server picks the next unused hue from the palette.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"description":"Hue for the label. The server picks one when omitted.","type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"]}},"required":["name"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"description":"Hue for the label. The server picks one when omitted.","type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"]}},"required":["name"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"description":"Hue for the label. The server picks one when omitted.","type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(lbl_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the label belongs to."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","color","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/labels/{labelId}":{"patch":{"operationId":"updateTeamLabel","summary":"Update a team label","description":"Renames a label, recolors it, or both. Every space wearing the label shows the new name and color.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(lbl_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the label belongs to."},"name":{"type":"string","minLength":1,"maxLength":32,"description":"Label name. Trimmed, and unique within the team ignoring case."},"color":{"type":"string","enum":["red","orange","yellow","green","blue","purple","pink","gray"],"description":"Label hue from the fixed palette."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","name","color","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"operationId":"deleteTeamLabel","summary":"Delete a team label","description":"Deletes the label and takes it off every space that wears it. The spaces themselves are untouched.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"responses":{"204":{"description":"The label was deleted."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/spaces/{spaceId}/labels/{labelId}":{"put":{"operationId":"addSpaceLabel","summary":"Put a label on a space","description":"Adds one of the team's labels to the space and returns the updated space. Adding a label the space already wears succeeds and changes nothing.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"delete":{"operationId":"removeSpaceLabel","summary":"Take a label off a space","description":"Removes one label from the space and returns the updated space. Removing a label the space does not wear succeeds and changes nothing.","security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"labelId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"mode":{"description":"`test` when the owning tenant is a linked test tenant, `live` otherwise.","type":"string","enum":["live","test"]},"providerRef":{"description":"WP Cloud `atomic_site_id` of the site serving this space. Use it with `providerClientId` to address the site in WP Cloud. Null until the space is placed.","type":["string","null"]},"providerClientId":{"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under.","type":["string","null"]},"teamId":{"type":["string","null"]},"teamSlug":{"type":["string","null"]},"principal":{"anyOf":[{"type":"object","properties":{"tenantId":{"type":"string"},"principalType":{"type":"string","enum":["team","external"]},"principalId":{"type":"string"}},"required":["tenantId","principalType","principalId"],"additionalProperties":false},{"type":"null"}]},"infrastructure":{"type":"object","properties":{"region":{"description":"Concrete region the space's site was placed in.","type":["string","null"]},"runtimeInstanceId":{"description":"Runtime instance serving this space.","type":["string","null"]},"managementHostname":{"description":"Permanent hostname minted for the provider site when it was created. It stays attached to the site for the site's whole life and never changes, even when the Space is renamed or gets a custom domain, so it is a stable key for matching this Space to its WP Cloud site. It is not the public URL: visitors use `liveUrl`, and WP Cloud reports the Space's primary hostname as the site's `domain_name`.","type":["string","null"]},"provisioningState":{"type":"string","enum":["provisioning","converged","degraded"],"description":"Convergence of the space against its intended infrastructure: still being placed, matching intent, or failing to converge."}},"required":["region","runtimeInstanceId","managementHostname","provisioningState"],"additionalProperties":false},"anonymous":{"type":"boolean"},"slug":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["provisioning","active","updating","deleting","failed"],"description":"Operation-lifecycle status. Serving state is the separate `disabled` axis."},"disabled":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"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))$"},{"type":"null"}]},"reasonCode":{"type":"string","enum":["anonymous_expired","publish_failed","abuse_takedown","tenant_suspended","site_suspended","author_removed","archived"],"description":"Why serving is disabled."}},"required":["at","reasonCode"],"additionalProperties":false},{"type":"null"}]},"claimState":{"anyOf":[{"type":"object","properties":{"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}]},"claimedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"purgeAfter":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["expiresAt","claimedAt","purgeAfter"],"additionalProperties":false},{"type":"null"}]},"expiryExtension":{"anyOf":[{"type":"object","properties":{"extendedTo":{"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":["extendedTo"],"additionalProperties":false},{"type":"null"}]},"defaultHostname":{"type":"string","description":"Current Spacefast-owned managed hostname: under space.fast, or under view.fast for a space created before space.fast. Renaming the space changes the label and keeps the apex; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed hostname."},"liveUrl":{"type":"string","description":"Live space URL: the primary bound domain when one exists, else the default hostname. Always present on non-deleted spaces."},"thumbnail":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["screenshot","image"]},"provider":{"type":"string","enum":["wpcom-mshots","wpcom-site-accelerator"]},"url":{"type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri"}},"required":["kind","provider","url","sourceUrl"],"additionalProperties":false},{"type":"null"}],"description":"Server-selected dashboard thumbnail. Screenshots use WordPress.com mShots; image thumbnails use WordPress.com Site Accelerator."},"dataLocation":{"type":"string","description":"Resolved data-location region, fixed when the space is created and immutable afterwards; \"auto\" only while no concrete region is known yet."},"region":{"type":"string","description":"Alias of dataLocation for placement dashboards; \"auto\" only while no concrete region is known yet."},"burstable":{"description":"Whether this space's site can burst provider PHP workers.","type":["boolean","null"]},"archivedBytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Bytes currently archived out of the hot runtime store."},"hasRuntime":{"type":"boolean","description":"Whether this space's live version runs code and therefore has a Runtime surface. Feature eligibility alone does not make the surface visible."},"channels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"versionId":{"type":"string","description":"Version this channel serves."},"updatedAt":{"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":["versionId","updatedAt"],"additionalProperties":false},"description":"Channel pointers by name. \"live\" is present after a version is promoted."},"config":{"anyOf":[{"type":"object","properties":{"index":{"description":"Directory index file; false disables index resolution.","anyOf":[{"type":"string","minLength":1},{"type":"boolean","const":false}]},"fallback":{"description":"Fallback document. \"/index.html\" means SPA. Defaults to the nearest 404.html.","anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"path":{"type":"string","minLength":1,"description":"Committed file served when no exact route matches."},"status":{"type":"integer","minimum":100,"maximum":599,"description":"Response status for the fallback."}},"required":["path","status"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `.html` files at their extensionless URL (`/about` serves `about.html`). Defaults to on, unless a 200-status SPA fallback is configured.","type":"boolean"},"listing":{"description":"Enable automatic directory listings.","type":"boolean"},"meta":{"description":"Listing, viewer, sharing, and browser icon metadata.","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"description":{"type":"string","maxLength":1000},"image":{"type":"string","maxLength":2000},"favicon":{"type":"string","maxLength":2000}},"additionalProperties":false},"superpowers":{"description":"Platform-managed built-ins and custom JavaScript snippets.","type":"object","properties":{"enabled":{"description":"Master switch for platform-managed injections.","type":"boolean"},"disable_all_injection":{"description":"When true, suppresses every platform-managed script/tag injection.","type":"boolean"},"googleAnalytics":{"type":"object","properties":{"enabled":{"type":"boolean"},"measurementId":{"type":"string","maxLength":64}},"additionalProperties":false},"googleTagManager":{"type":"object","properties":{"enabled":{"type":"boolean"},"containerId":{"type":"string","maxLength":64}},"additionalProperties":false},"javascriptTags":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":128},"name":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"code":{"type":"string","maxLength":8192}},"required":["code"],"additionalProperties":false}},"tags":{"type":"object","properties":{"inheritance":{"type":"object","properties":{"inherited":{"type":"boolean"},"overrides":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string","minLength":1},"disabled":{"default":false,"type":"boolean"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["tagId","disabled"],"additionalProperties":false}}},"additionalProperties":false},"requireReview":{"description":"When true, integration changes must go through review before release.","type":"boolean"}},"additionalProperties":false}},"additionalProperties":false},"templates":{"description":"Files that receive {{ vars.NAME }} substitution at finalize.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"theme":{"description":"Visual tokens for every Spacefast-authored page.","type":"object","properties":{"accent":{"description":"Accent color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"background":{"description":"Background color for Spacefast-authored pages.","type":"string","maxLength":64,"pattern":"^(?:#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\\([0-9.,\\s%/]{1,64}\\)|hsla?\\([0-9.,\\s%deg/]{1,64}\\)|[a-zA-Z]{3,30})$"},"logo":{"description":"Logo image (https URL or root-relative path) shown in the brand row.","type":"string","maxLength":2000,"pattern":"^(?:https:\\/\\/[^\\s\"'<>\\\\]+|\\/[^\\s\"'<>\\\\]*)$"},"name":{"description":"Display name shown in the brand row of Pages defaults.","type":"string","minLength":1,"maxLength":120},"font":{"description":"Font-family stack applied to Spacefast-authored pages.","type":"string","maxLength":256,"pattern":"^[A-Za-z0-9 ,'\"-]{1,256}$"},"hideSpacefastBranding":{"description":"Remove the Spacefast badge from default pages when the plan permits it.","type":"boolean"}},"additionalProperties":false},"collab":{"description":"Comments overlay delivery. `default` injects Spacefast's UI; `custom` injects only /__spacefast/collab.css for a self-built UI. Turning comments off lives in the Space's Comments settings, not here.","type":"object","properties":{"ui":{"default":"default","type":"string","enum":["default","custom"]}},"required":["ui"],"additionalProperties":false},"build":{"description":"Default settings for remote repository builds.","type":"object","properties":{"rootDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"installCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"buildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"outputDirectory":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"ignoredBuildCommand":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"frameworkPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"platformPreset":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"allowUnsupportedPlatformFeatures":{"type":"boolean"},"timeoutSeconds":{"type":"integer","minimum":60,"maximum":7200}},"additionalProperties":false},"placement":{"type":"object","properties":{"burstable":{"type":"boolean"},"edge":{"description":"Run the redirects and headers the edge can answer at the edge, ahead of the space. Takes effect at the next publish. Off by default; the rules the edge cannot answer faithfully stay with the space either way.","type":"boolean"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"firewall":{"description":"Requests to block or challenge before they reach the space.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"action":{"type":"string","enum":["block","challenge"],"description":"`block` answers without reaching the space; `challenge` asks for proof of a human."},"status":{"description":"Status a blocked request gets. Defaults to 403. Blocks only.","type":"integer","minimum":400,"maximum":499},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["action","match"],"additionalProperties":false,"description":"Blocks or challenges requests before they reach the space. At most 47 authored comparisons; platform transport paths are exempt. An any rule uses one provider fence per comparison."}},"cache":{"description":"Cache behavior, including which requests skip it.","type":"object","properties":{"bypass":{"description":"Requests that skip the cache, in order. At most 50.","maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,60}$","description":"Name for this rule: lowercase letters, digits, `-` and `_`, up to 61 characters. Names the rule in the CLI and the API."},"description":{"description":"What this rule is for.","type":"string","maxLength":255},"match":{"$ref":"#/components/schemas/TrafficRuleMatch"},"any":{"description":"Fire when any match field holds. Defaults to false: all of them have to.","type":"boolean"}},"required":["match"],"additionalProperties":false,"description":"Serves matching requests fresh instead of from the cache."}}},"additionalProperties":false},"redirects":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path or absolute URL. :splat and :name from the source are substituted."},"status":{"description":"Redirect status, 302 when omitted. To serve other content under this URL, use rewrites.","type":"number","enum":[301,302,303,307,308]},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}}},"required":["source","destination"],"additionalProperties":false},"description":"Browser redirect rules. Same matcher grammar as _redirects, and _redirects rules match first."},"rewrites":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match. * is a splat, :name captures a segment."},"destination":{"type":"string","minLength":1,"description":"Path to serve under this URL, or an absolute URL to proxy. :splat and :name from the source are substituted."},"cache":{"description":"Let shared caches store the proxy response. Absolute-URL destinations only.","type":"string","const":"shared"},"force":{"description":"Answer even when the request path resolves to a committed file, the ! of a _redirects rule.","type":"boolean"},"query":{"description":"Query parameters the request must carry, as parameter name to capture name: { \"id\": \"id\" } is the name=:capture token id=:id.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$"},"additionalProperties":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]*$"}},"notFound":{"description":"Serve the destination with status 404, the 404 of a _redirects rule. The destination must be a path.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false},"description":"Rewrite and proxy rules: the URL stays, the content comes from the destination. _redirects rules match first, then redirects."},"headers":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"description":"Request path to match."},"headers":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"remove":{"type":"boolean","const":true,"description":"Remove this header instead of setting it, the !Name line of a _headers block."}},"required":["key","remove"],"additionalProperties":false}]}}},"required":["source","headers"],"additionalProperties":false},"description":"Response headers to set or remove on matching requests. A _headers rule wins on the same header name."},"users":{"type":"object","properties":{"enabled":{"type":"boolean"},"providers":{"type":"object","properties":{"google":{"oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"disabled"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"managed"}},"required":["mode"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"direct"},"clientId":{"type":"string","minLength":1,"maxLength":512}},"required":["mode","clientId"],"additionalProperties":false}]},"gravatar":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"spacefast":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}},"required":["google","gravatar","spacefast"],"additionalProperties":false}},"required":["enabled","providers"],"additionalProperties":false},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Stable source identifier: 1-128 letters, numbers, or underscores; starts with a letter or underscore; excludes __proto__, constructor, and prototype.","not":{"enum":["__proto__","constructor","prototype"]}},"additionalProperties":{"type":"object","properties":{"kind":{"type":"string","const":"wordpress"},"url":{"type":"string","minLength":1,"maxLength":2048,"format":"uri","pattern":"^https:\\/\\/[^/?#@%\\\\\\s]+(?:\\/[^?#\\\\\\s]*)?$","description":"Canonical public WordPress URL: lowercase https:// scheme; IDNA-normalized DNS labels (1-63 characters each, 253 total, alphanumeric edges, alphanumeric or hyphen interior), canonical dotted-decimal IPv4, or bracketed hexadecimal IPv6; optional nonzero port and UTF-8 path. Percent escapes are validated and canonicalized; encoded percent signs, slashes, backslashes, controls, invalid UTF-8, whitespace other than encoded ASCII path spaces, credentials, queries, fragments, and trailing-dot hosts are rejected. Default port, host case, IDNs, dot segments, path encoding, and trailing path slashes are normalized before storage."}},"required":["kind","url"],"additionalProperties":false,"description":"A public WordPress site exposed to repository builds as a content source."},"maxProperties":32},"defaultDataSource":{"description":"Name of the configured source exposed through `WORDPRESS_URL`. It must match a `dataSources` entry. When omitted, the first source in bytewise name order is used.","type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","not":{"enum":["__proto__","constructor","prototype"]}}},"additionalProperties":false},{"type":"null"}],"description":"Stored SpaceConfig overlay applied over the live version's sf.jsonc; null when nothing is overridden."},"grandfatherBrandingRemoval":{"description":"Whether this Space can keep removing the badge under a newer plan.","type":"boolean"},"settingsDigest":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"CAS token for versioned settings writes (digest over title + config overlay). Send it back as baseSettingsDigest on PATCH to get compare-and-swap semantics."},"noindex":{"type":"boolean","description":"When true, the live production hostnames serve platform noindex directives. True whenever the owning team hides its spaces from search engines (`teamAccessPolicy.noindex`), whatever this space's own setting. Immutable version and preview hostnames are always noindex regardless of this setting."},"teamAccessPolicy":{"description":"The owning team's access rules that bind this space, or null when no team owns it. `privateSpacesOnly` means the space cannot be made public; `noindex` means it cannot be shown to search engines.","anyOf":[{"type":"object","properties":{"privateSpacesOnly":{"type":"boolean","description":"When true, no space in this team can be public: public Grants, public new-space defaults, and `access: public` on create or publish are refused with `team_private_spaces_only`, and public access declared in sf.jsonc is ignored. Turning it on revokes every public Grant on the team's spaces and turns `noindex` on."},"noindex":{"type":"boolean","description":"When true, every space in this team serves platform noindex directives on its live hostnames, whatever its own `noindex` says, and a space cannot turn it off. Always true while `privateSpacesOnly` is true."}},"required":["privateSpacesOnly","noindex"],"additionalProperties":false},{"type":"null"}]},"pinnedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"Instant the space was pinned to the top of its team's space list, or null when it is not pinned. The pin is team-wide: everyone who can see the team sees it."},"labelIds":{"type":"array","items":{"type":"string"},"description":"Ids of the team labels on this space, ordered by label name. Empty when the space carries none. Manage them with PUT and DELETE /v1/spaces/{spaceId}/labels/{labelId}."},"viewerCanDelete":{"description":"Whether the caller's account may delete this space. Team owners and admins can delete any space in the team; a member can delete the spaces they created. Absent on unclaimed spaces, which their space key governs, and when the request carries no account credential.","type":"boolean"},"viewerCanTransfer":{"description":"Whether the caller's account may transfer this space to another team. Team owners and admins can; a member who created the space can from the dashboard while nobody else has published to it and it has no custom domain, database, or paid resource. Present on single-space GET reads only; absent on lists, on write responses, on unclaimed spaces, and when the request carries no account credential.","type":"boolean"},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github","connected"],"description":"Who owns the Git history. `spacefast`: push to publish. `github` or `connected`: deploys from an upstream repository; direct pushes are refused."},"remoteUrl":{"description":"Credential-free git remote to push to, or null for an upstream-managed repository. Authenticate as HTTP Basic user `t` with a space key or API key as the password.","type":["string","null"]},"repository":{"description":"Name of the connected upstream repository this Space deploys from, else null.","type":["string","null"]},"defaultBranch":{"description":"Branch that publishes to the live channel when pushed.","type":["string","null"]},"provisioned":{"type":"boolean","description":"Whether the repository behind this block exists yet. Always true for a GitHub binding; for a hosted remote, true once it was minted or first pushed to, and false while there is nothing to browse."}},"required":["managedBy","remoteUrl","repository","defaultBranch","provisioned"],"additionalProperties":false},{"type":"null"}],"description":"Git remote for this space, or null when it has no repository yet. Push to `remoteUrl` to publish."},"operation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"resources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"progress":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["total","completed","failed"],"additionalProperties":false},"diagnostics":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Stable snake_case diagnostic code naming the public contract that produced it."},"severity":{"type":"string","enum":["info","warning","error"],"description":"How actionable the diagnostic is."},"message":{"type":"string","description":"Human-readable explanation with enough detail to act on."},"path":{"description":"Artifact path the diagnostic points at, for example \"_headers:12\", when one exists.","type":["string","null"]},"provider":{"description":"Upstream system the diagnostic originated from, when not Spacefast itself.","anyOf":[{"type":"string","enum":["infra","dns","registrar","runtime"]},{"type":"null"}]},"details":{"description":"Machine-readable context for the diagnostic code.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fix":{"description":"Concrete, agent-actionable remediation hint, when one can be derived.","type":["string","null"]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","type":["boolean","null"]}},"required":["code","severity","message"],"additionalProperties":false}},"createdAt":{"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))$"},"finishedAt":{"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","kind","status","resources","createdAt"],"additionalProperties":false},{"type":"null"}]},"createdAt":{"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))$"},"updatedAt":{"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","teamId","teamSlug","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","pinnedAt","labelIds","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/show-and-tell/submissions":{"post":{"operationId":"submitShowAndTellEntry","summary":"Submit a space to Show & Tell","description":"Ask for public inclusion in Show & Tell. This permits a screenshot of the public page and a “Shared by” credit with your display name or “Spacefast creator”. The live Space must be public. Submission does not change sharing settings. A moderator reviews the entry before it appears. The gallery follows later live publishes without requiring another submission. Resolve the Space ID with existing Space reads before submitting.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"idempotency-key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"maxLength":64}},"required":["spaceId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"maxLength":64}},"required":["spaceId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spaceId":{"type":"string","minLength":1,"maxLength":64}},"required":["spaceId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string","description":"The submitted Space."},"state":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]},"title":{"type":"string"},"credit":{"type":"string"},"liveUrl":{"type":"string","format":"uri"}},"required":["id","spaceId","state","title","credit","liveUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]},"get":{"operationId":"listShowAndTellSubmissions","summary":"Review the Show & Tell queue","description":"Read submissions, newest updates first, with working and approved copies. Review liveUrl and its currentLiveVersionId. approvedVersionId and publishedAt record the last review baseline. They do not retain version files. Requires current membership of the Show & Tell team. publicNow checks current public access to the live Space.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","maxLength":80},"id":{"type":"string"},"spaceId":{"type":"string"},"submittedByUserId":{"type":"string"},"creatorKey":{"type":"string"},"state":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]},"revision":{"type":"number"},"publishedJson":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","minLength":1,"maxLength":80},"creatorId":{"type":"string"},"creatorUserId":{"type":"string"}},"required":["title","description","category","tags","credit","creatorId","creatorUserId"],"additionalProperties":false},{"type":"null"}]},"approvedVersionId":{"type":["string","null"]},"creatorReason":{"type":["string","null"]},"internalNote":{"type":["string","null"]},"publishedAt":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"liveUrl":{"type":"string","format":"uri"},"currentLiveVersionId":{"type":["string","null"]},"publicNow":{"type":"boolean"}},"required":["title","description","category","tags","credit","id","spaceId","submittedByUserId","creatorKey","state","revision","publishedJson","approvedVersionId","creatorReason","internalNote","publishedAt","createdAt","updatedAt","liveUrl","currentLiveVersionId","publicNow"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/show-and-tell/submissions/{id}/withdraw":{"post":{"operationId":"withdrawShowAndTellEntry","summary":"Withdraw a Show & Tell entry","description":"Remove your submission from the public directory. The submitter or a current Space creator, owner, or admin can withdraw it. This does not delete the Space or change sharing settings. Moderators cannot republish a withdrawn entry. Submit it again to ask for a new review.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string","description":"The submitted Space."},"state":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]},"title":{"type":"string"},"credit":{"type":"string"},"liveUrl":{"type":"string","format":"uri"}},"required":["id","spaceId","state","title","credit","liveUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/show-and-tell/entries":{"get":{"operationId":"listShowAndTellEntries","summary":"Explore Show & Tell","description":"Browse approved public spaces, newest first. Filter by title or description, category, tag, creator ID, or entry ID. A page can contain fewer entries than its limit, including none, while hasMore is true. Follow nextCursor until hasMore is false. The destination and screenshot use the current live Space URL. Later publishes stay featured. The live Space must remain public. Withdrawn entries stay hidden.","security":[],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["apps","games","art","stories","personal"]}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"creator","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":256}},{"name":"limit","in":"query","required":false,"schema":{"default":24,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string"},"liveUrl":{"type":"string","format":"uri","description":"Current public URL of the featured Space."},"screenshotUrl":{"type":"string","format":"uri"},"screenshotAlt":{"type":"string"},"creatorId":{"type":"string"},"attributionType":{"type":"string","const":"shared_by"},"publishedAt":{"type":"string"}},"required":["title","description","category","tags","credit","id","liveUrl","screenshotUrl","screenshotAlt","creatorId","attributionType","publishedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/show-and-tell/submissions/mine":{"get":{"operationId":"listMyShowAndTellSubmissions","summary":"Read your Show & Tell submissions","description":"Read your submission status and any review feedback. Internal moderator notes are not returned.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string","description":"The submitted Space."},"state":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]},"title":{"type":"string"},"credit":{"type":"string"},"liveUrl":{"type":"string","format":"uri"},"creatorReason":{"type":["string","null"]}},"required":["id","spaceId","state","title","credit","liveUrl","creatorReason"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/show-and-tell/moderate":{"post":{"operationId":"moderateShowAndTellEntry","summary":"Moderate a Show & Tell entry","description":"Edit, approve, decline, or unlist an entry. Read its current revision first. Every action advances the revision; use the returned revision for the next action. Approval publishes the reviewed working copy after checking live public access again. Supply versionId from the live version you reviewed. Use approval to restore an unlisted entry. Withdrawn entries require a new creator submission. The live version must still match versionId at approval. Approval records that version as a baseline. Later publishes change the destination content without hiding the listing. Requires current membership of the Show & Tell team.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"edit"}},"required":["id","revision","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"approve"},"versionId":{"type":"string","minLength":1,"maxLength":64}},"required":["id","revision","action","versionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"decline"},"creatorReason":{"type":"string","minLength":1,"maxLength":1000},"internalNote":{"type":"string","maxLength":2000}},"required":["id","revision","action","creatorReason"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"unlist"}},"required":["id","revision","action"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"edit"}},"required":["id","revision","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"approve"},"versionId":{"type":"string","minLength":1,"maxLength":64}},"required":["id","revision","action","versionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"decline"},"creatorReason":{"type":"string","minLength":1,"maxLength":1000},"internalNote":{"type":"string","maxLength":2000}},"required":["id","revision","action","creatorReason"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"unlist"}},"required":["id","revision","action"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":280},"category":{"anyOf":[{"type":"string","enum":["apps","games","art","stories","personal"]},{"type":"null"}]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"credit":{"type":"string","minLength":1,"maxLength":80},"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"edit"}},"required":["id","revision","action"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"approve"},"versionId":{"type":"string","minLength":1,"maxLength":64}},"required":["id","revision","action","versionId"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"decline"},"creatorReason":{"type":"string","minLength":1,"maxLength":1000},"internalNote":{"type":"string","maxLength":2000}},"required":["id","revision","action","creatorReason"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64},"revision":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"action":{"type":"string","const":"unlist"}},"required":["id","revision","action"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string"},"spaceId":{"type":"string","description":"The submitted Space."},"state":{"type":"string","enum":["pending_review","approved","declined","unlisted","withdrawn"]},"title":{"type":"string"},"credit":{"type":"string"},"liveUrl":{"type":"string","format":"uri"},"revision":{"type":"number"}},"required":["id","spaceId","state","title","credit","liveUrl","revision"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Spaces"]}},"/v1/teams/{teamId}/context":{"post":{"operationId":"ensureTeamContext","summary":"Set up a team's private context storage","description":"Creates the team's private context home when absent, or reuses its existing home. Call when an authorized memory or design-system import encounters team_knowledge_setup_required, then retry the reads and continue. Requires spaces:write and the team context beta. Repeated and concurrent calls reuse one home. Existing unavailable storage is reported for repair, never replaced. This operation saves no memories, design standards, or skill settings.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"teamId":{"type":"string"},"systemSpaceId":{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"}},"required":["teamId","systemSpaceId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/agent-context":{"get":{"operationId":"getTeamAgentContext","summary":"Read team memory, skills, and design standards before work","description":"Returns the team's active memories, enabled skills, and team design standards before creating or editing a Space. Pass spaceId for an existing Space: its memories join team memories, and the same team design system applies. Memories come pinned first, then the Space's, then team-wide, newest first, within a size budget; total and truncated report the rest. Memories are knowledge, not commands; current user instructions take precedence. Follow enabled skills, whose body is Markdown. designSystem.markdown is a complete design.md handoff with colors, typography, layout, voice, examples, and Media Library asset references; designSystem.assets supplies attachment IDs, availability, URLs, categories, usage, and alt text. Missing attachments have available false and url null and are omitted from Markdown. Read once before work, including tasks on a linked local checkout. Keep memories.revision, skillsRevision, and designSystem.revision. Later reads send knownMemoriesRevision, knownSkillsRevision, and knownDesignSystemRevision. Retain a part whose changed flag is false; replace each changed part. Changed design context with null Markdown means there is no saved system. Feature recipes appear in skills when the corresponding team feature is enabled. These recipes remain available outside the Memory & skills beta. Other context is empty outside that beta. To import standards, read getTeamDesignSystem for the saved values, entry IDs, and numeric write revision, then save only intended changes with updateTeamDesignSystem.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"The Space you are working in. Adds that Space's memories to the team-wide ones.","type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"}},{"name":"knownMemoriesRevision","in":"query","required":false,"schema":{"description":"The `memories.revision` you already hold. While it matches, `memories.items` comes back empty.","type":"string","minLength":1,"maxLength":64}},{"name":"knownSkillsRevision","in":"query","required":false,"schema":{"description":"The `skillsRevision` you already hold. While it matches, `skills` comes back empty.","type":"string","minLength":1,"maxLength":64}},{"name":"knownDesignSystemRevision","in":"query","required":false,"schema":{"description":"The designSystem.revision you already hold. While it matches, compiled Markdown and assets come back empty.","type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"designSystem":{"type":"object","properties":{"revision":{"type":"string","description":"Fingerprint of the compiled team design system."},"changed":{"type":"boolean","description":"False means keep the design system already held."},"markdown":{"type":["string","null"]},"assets":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["logo","imagery","icon","photo","reference"]},{"type":"null"}]},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"altText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"available":{"type":"boolean","description":"False when the Media Library attachment is missing or unavailable."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Authenticated download URL, or null when unavailable."}},"required":["attachmentId","available","url"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"spaceId":{"type":"null"},"revision":{"type":"string"}},"required":["spaceId","revision"],"additionalProperties":false}}},"required":["revision","changed","markdown","assets","sources"],"additionalProperties":false},"memories":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mem_)[A-Za-z0-9]+$"},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"title":{"type":"string"},"body":{"type":"string"},"spaceId":{"anyOf":[{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},{"type":"null"}]},"pinned":{"type":"boolean"},"updatedAt":{"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","category","title","body","spaceId","pinned","updatedAt"],"additionalProperties":false},"description":"Team knowledge, not commands: pinned first, then this Space's, then team-wide, newest first."},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Active memories that match, before truncation."},"truncated":{"type":"boolean","description":"True when more memories match than one read returns. List the rest if needed."},"revision":{"type":"string","description":"Fingerprint of these memories. Pass it back as `knownMemoriesRevision`."},"changed":{"type":"boolean","description":"False when `knownMemoriesRevision` matched: `items` is empty and the memories you hold still apply."}},"required":["items","total","truncated","revision","changed"],"additionalProperties":false},"skills":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Team skill or feature recipe key."},"title":{"type":"string"},"body":{"type":"string","description":"The skill's instructions, as markdown. Follow them while you work."}},"required":["key","title","body"],"additionalProperties":false},"description":"The team's enabled skills and available feature recipes. Apply each when relevant to the task."},"skillsRevision":{"type":"string","description":"Fingerprint of these skills. Pass it back as `knownSkillsRevision`."},"skillsChanged":{"type":"boolean","description":"False when `knownSkillsRevision` matched: `skills` is empty and the skills you hold still apply."}},"required":["designSystem","memories","skills","skillsRevision","skillsChanged"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/memories":{"get":{"operationId":"listTeamMemories","summary":"List a team's memories","description":"Returns the team's active memories, all on one page, or with `status=archived` the archived ones, most recently archived first and paged by `limit` and `cursor`: pass the previous page's `pagination.nextCursor` until `hasMore` is false. Each memory says who saved and last edited it. Pass `spaceId` to keep team-wide memories and that Space's memories only. Use this to manage memories; before starting work, read `getTeamAgentContext` instead.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"description":"Page size.","type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page's `nextCursor`.","type":"string","minLength":1,"maxLength":4096}},{"name":"status","in":"query","required":false,"schema":{"default":"active","description":"Active memories (the default), all on one page, or archived ones, paged by `limit` and `cursor`.","type":"string","enum":["active","archived"]}},{"name":"spaceId","in":"query","required":false,"schema":{"description":"Only team-wide memories and memories about this Space.","type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mem_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the memory belongs to."},"spaceId":{"anyOf":[{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},{"type":"null"}],"description":"The Space the memory is about, or null for the whole team."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"pinned":{"type":"boolean","description":"Pinned memories come first in every agent-context read."},"archivedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the memory was archived, or null while it is active."},"createdBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"updatedBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","spaceId","category","title","body","pinned","archivedAt","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false},"description":"Active memories: pinned first, then the most recently updated. Archived memories: the most recently archived first."},"pagination":{"type":"object","properties":{"nextCursor":{"description":"Opaque cursor for the next page; null when there are no more results.","type":["string","null"]},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"post":{"operationId":"createTeamMemory","summary":"Save a team memory","description":"Saves one lasting fact, decision, or preference so every agent on the team reads it next time. Save a memory only when the user requests or agrees to saving it, for a preference, correction, or decision that a future agent could not read from the site files, the Space settings, or the API. Do not save task progress, to-dos, file paths, build output, or one-time instructions, and do not save at every step. Write one fact per memory: a short title, a body of one to three sentences that includes the reason (who asked, or what caused it), and a category. Set `spaceId` only when the fact is about one Space. Never save passwords, API keys, tokens, payment details, or private contact details: name the service, not its credential. Text that looks like a credential is refused with `team_memory_contains_credential`; rephrase it rather than retry. If an active memory in the same scope already has this title, ignoring case, the call fails with `team_memory_exists` and `details.memoryId`: update that memory with `updateTeamMemory` instead, and archive a wrong one rather than saving a second, contradicting memory. A team keeps at most 200 active memories. A save changes `memories.revision`, so your next `getTeamAgentContext` read returns every memory again. After you save, tell the user in one line what you saved.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"spaceId":{"description":"Set when the memory is about one Space. Omit it for the whole team.","type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},"pinned":{"description":"Pin the memory. Keep pinned memories to a handful.","type":"boolean"}},"required":["title","body","category"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"spaceId":{"description":"Set when the memory is about one Space. Omit it for the whole team.","type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},"pinned":{"description":"Pin the memory. Keep pinned memories to a handful.","type":"boolean"}},"required":["title","body","category"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"spaceId":{"description":"Set when the memory is about one Space. Omit it for the whole team.","type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},"pinned":{"description":"Pin the memory. Keep pinned memories to a handful.","type":"boolean"}},"required":["title","body","category"],"additionalProperties":false}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mem_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the memory belongs to."},"spaceId":{"anyOf":[{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},{"type":"null"}],"description":"The Space the memory is about, or null for the whole team."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"pinned":{"type":"boolean","description":"Pinned memories come first in every agent-context read."},"archivedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the memory was archived, or null while it is active."},"createdBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"updatedBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","spaceId","category","title","body","pinned","archivedAt","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/memories/{memoryId}":{"patch":{"operationId":"updateTeamMemory","summary":"Update or archive a team memory","description":"Changes a memory's title, body, category, or pin. Send `archived: true` to retire a wrong or stale memory, and `archived: false` to restore it; a restore meets the same title and 200-memory checks as a new save. A memory's Space cannot change.","security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"memoryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"pinned":{"type":"boolean"},"archived":{"description":"true archives a wrong or stale memory. false restores it.","type":"boolean"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"pinned":{"type":"boolean"},"archived":{"description":"true archives a wrong or stale memory. false restores it.","type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"pinned":{"type":"boolean"},"archived":{"description":"true archives a wrong or stale memory. false restores it.","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^(mem_)[A-Za-z0-9]+$"},"teamId":{"type":"string","description":"Team the memory belongs to."},"spaceId":{"anyOf":[{"type":"string","pattern":"^(spc_)[A-Za-z0-9]+$"},{"type":"null"}],"description":"The Space the memory is about, or null for the whole team."},"category":{"type":"string","enum":["brand","voice","audience","design","decision","convention","preference","fact"],"description":"What kind of knowledge the memory holds."},"title":{"type":"string","minLength":3,"maxLength":80,"description":"Short title. Unique among the team's active memories in the same scope, ignoring case."},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"One fact, decision, or preference in one to three sentences, with the reason."},"pinned":{"type":"boolean","description":"Pinned memories come first in every agent-context read."},"archivedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the memory was archived, or null while it is active."},"createdBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"updatedBy":{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},"createdAt":{"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))$"},"updatedAt":{"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","teamId","spaceId","category","title","body","pinned","archivedAt","createdBy","updatedBy","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]},"delete":{"operationId":"deleteTeamMemory","summary":"Delete a team memory","description":"Deletes a memory for good, for example one that holds something sensitive. Only team owners and admins can delete. Agents archive with `updateTeamMemory` instead.","security":[{"bearerAuth":[]}],"responses":{"204":{"description":"The memory was deleted."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"memoryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Teams"]}},"/v1/teams/{teamId}/skills":{"get":{"operationId":"listTeamSkills","summary":"List team skills","description":"Returns every preset team skill, such as SEO or Spam protection, with its instructions and whether it is on for this team. `setup` names a secret team variable the skill needs, and `configured` says whether the team saved it. The variable's value is never returned.","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["seo","no-slop","front-end-craft","social-previews","speed","accessibility","spam-protection","contact-forms","security-headers","privacy-consent"],"description":"Team skill key."},"title":{"type":"string"},"summary":{"type":"string","description":"One sentence on what the skill does."},"inspiredBy":{"description":"The WordPress plugins it echoes, or null for a Spacefast original.","type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string","enum":["When this applies","Do","Don't","Verify"]},"items":{"type":"array","items":{"type":"string"}}},"required":["heading","items"],"additionalProperties":false},"description":"What agents are told, section by section."},"setup":{"anyOf":[{"type":"object","properties":{"variable":{"type":"string","description":"Secret team variable the skill needs, by name."},"configured":{"type":"boolean","description":"True when the team has saved that variable."}},"required":["variable","configured"],"additionalProperties":false,"description":"Setup the skill needs before it fully works."},{"type":"null"}]},"enabled":{"type":"boolean"},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When someone last turned it on or off, or null while it has its default."},"updatedBy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},{"type":"null"}]}},"required":["key","title","summary","inspiredBy","sections","setup","enabled","updatedAt","updatedBy"],"additionalProperties":false},"description":"Every team skill, in catalog order."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/skills/{skillKey}":{"patch":{"operationId":"updateTeamSkill","summary":"Turn a team skill on or off","description":"Turns one preset team skill on or off for every agent on the team. Only team owners and admins can change skills; agents cannot.","security":[{"bearerAuth":[]}],"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"skillKey","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Turn the skill on or off for the whole team."}},"required":["enabled"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Turn the skill on or off for the whole team."}},"required":["enabled"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean","description":"Turn the skill on or off for the whole team."}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"key":{"type":"string","enum":["seo","no-slop","front-end-craft","social-previews","speed","accessibility","spam-protection","contact-forms","security-headers","privacy-consent"],"description":"Team skill key."},"title":{"type":"string"},"summary":{"type":"string","description":"One sentence on what the skill does."},"inspiredBy":{"description":"The WordPress plugins it echoes, or null for a Spacefast original.","type":["string","null"]},"sections":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string","enum":["When this applies","Do","Don't","Verify"]},"items":{"type":"array","items":{"type":"string"}}},"required":["heading","items"],"additionalProperties":false},"description":"What agents are told, section by section."},"setup":{"anyOf":[{"type":"object","properties":{"variable":{"type":"string","description":"Secret team variable the skill needs, by name."},"configured":{"type":"boolean","description":"True when the team has saved that variable."}},"required":["variable","configured"],"additionalProperties":false,"description":"Setup the skill needs before it fully works."},{"type":"null"}]},"enabled":{"type":"boolean"},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When someone last turned it on or off, or null while it has its default."},"updatedBy":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["person","agent","api_key","system"],"description":"person: a signed-in member. agent: an OAuth agent connection."},"userId":{"description":"The person, or the person who connected the agent.","type":["string","null"]},"connectionId":{"description":"The agent connection (grant) that wrote it, for agent writes.","type":["string","null"]},"name":{"description":"Display name: the person, agent, or API key.","type":["string","null"]}},"required":["type","userId","connectionId","name"],"additionalProperties":false,"description":"Who wrote the memory."},{"type":"null"}]}},"required":["key","title","summary","inspiredBy","sections","setup","enabled","updatedAt","updatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/design-system":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"operationId":"getTeamDesignSystem","summary":"Read a team's saved design-system values","description":"Returns active colors, typography, layout, voice/rules, and Media Library assets with stable entry IDs. Use the numeric revision as expectedRevision when saving or undoing; actionId identifies the last undoable action. An absent system has document null and revision 0. Uploads, undo history, archived values, and retry receipts are excluded. Missing attachments retain their entry IDs and guidance with available false and url null, so they can be replaced or removed. The design system is team-wide. For compiled Markdown and unchanged-context detection, use getTeamAgentContext; its designSystem.revision is a separate context fingerprint.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"anyOf":[{"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)$"},{"type":"null"}]},"document":{"anyOf":[{"type":"object","properties":{"colors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hex":{},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"required":["name","hex","id"],"additionalProperties":false}},"typography":{"type":"object","properties":{"headings":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255},"h2":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false,"description":"Shared heading font; fontSizePx and lineHeightPx define Heading 1, with separate h2 and h3 sizes."},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false},{"type":"null"}]},"headingCase":{"anyOf":[{"type":"string","enum":["sentence","title","uppercase","lowercase","unchanged"]},{"type":"null"}]}},"additionalProperties":false},"layout":{"type":"object","properties":{"pageWidthPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"cornerRadiusPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"sectionSpacingPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]}},"additionalProperties":false},"voice":{"type":"object","properties":{"tone":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"rules":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32768},"example":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"required":["text","id"],"additionalProperties":false}}},"required":["tone","rules"],"additionalProperties":false},"assets":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["logo","imagery","icon","photo","reference"]},{"type":"null"}]},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"altText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"available":{"type":"boolean","description":"False when the Media Library attachment is missing or unavailable."},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Authenticated download URL, or null when unavailable."},"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)$"}},"required":["attachmentId","available","url","id"],"additionalProperties":false}}},"required":["colors","typography","layout","voice","assets"],"additionalProperties":false},{"type":"null"}]},"updatedAt":{"anyOf":[{"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))$"},{"type":"null"}]},"teamId":{"type":"string"}},"required":["revision","actionId","document","updatedAt","teamId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/design-system/assets/{attachmentId}":{"get":{"security":[{"bearerAuth":[]},{"sessionCookie":[]},{"oauth2":["spaces:read"]}],"operationId":"getTeamDesignSystemAsset","summary":"Download a team's design-system asset","description":"Returns original Media Library bytes after checking team ownership and read access. Use the asset URL from getTeamDesignSystem or getTeamAgentContext with an authenticated API request or session cookie. Responses are private and must not be cached.","responses":{"200":{"description":"Attachment bytes","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"attachmentId","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"tags":["Teams"]}},"/v1/teams/{teamId}/design-system/changes":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"updateTeamDesignSystem","summary":"Save a team's design-system changes","description":"Atomically saves partial color, typography, layout, tone, rule, and asset-guidance changes. Omitted fields stay unchanged; null clears optional values. Upserts without IDs create records. changes lists changed colors, rules, and assets in that collection order, with upserts then removals in request order, followed by typography, layout, and tone; unchanged entries are omitted. Remove archives a record. Pass the current expectedRevision (0 for the first save); a stale revision returns 409. Reuse operationId and identical input after an uncertain response. Upload asset bytes separately, then reference the returned attachmentId. A save does not modify any Space's site files. Requires the team context beta.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changes":{"type":"object","properties":{"colors":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hex":{"type":"string","pattern":"^#[A-Fa-f0-9]{6}(?:[A-Fa-f0-9]{2})?$"},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false},"typography":{"type":"object","properties":{"headings":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255},"h2":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false,"description":"Shared heading font; fontSizePx and lineHeightPx define Heading 1, with separate h2 and h3 sizes."},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false},{"type":"null"}]},"headingCase":{"anyOf":[{"type":"string","enum":["sentence","title","uppercase","lowercase","unchanged"]},{"type":"null"}]}},"additionalProperties":false},"layout":{"type":"object","properties":{"pageWidthPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"cornerRadiusPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"sectionSpacingPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]}},"additionalProperties":false},"voice":{"type":"object","properties":{"tone":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"rules":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32768},"example":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false},"assets":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["logo","imagery","icon","photo","reference"]},{"type":"null"}]},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"altText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false}},"required":["operationId","expectedRevision","changes"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changes":{"type":"object","properties":{"colors":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hex":{"type":"string","pattern":"^#[A-Fa-f0-9]{6}(?:[A-Fa-f0-9]{2})?$"},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false},"typography":{"type":"object","properties":{"headings":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255},"h2":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false,"description":"Shared heading font; fontSizePx and lineHeightPx define Heading 1, with separate h2 and h3 sizes."},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false},{"type":"null"}]},"headingCase":{"anyOf":[{"type":"string","enum":["sentence","title","uppercase","lowercase","unchanged"]},{"type":"null"}]}},"additionalProperties":false},"layout":{"type":"object","properties":{"pageWidthPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"cornerRadiusPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"sectionSpacingPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]}},"additionalProperties":false},"voice":{"type":"object","properties":{"tone":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"rules":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32768},"example":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false},"assets":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["logo","imagery","icon","photo","reference"]},{"type":"null"}]},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"altText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false}},"required":["operationId","expectedRevision","changes"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changes":{"type":"object","properties":{"colors":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"hex":{"type":"string","pattern":"^#[A-Fa-f0-9]{6}(?:[A-Fa-f0-9]{2})?$"},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false},"typography":{"type":"object","properties":{"headings":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255},"h2":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]},"h3":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000}},"required":["fontSizePx","lineHeightPx"],"additionalProperties":false},{"type":"null"}]}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false,"description":"Shared heading font; fontSizePx and lineHeightPx define Heading 1, with separate h2 and h3 sizes."},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"fontSizePx":{"type":"number","minimum":0,"maximum":100000},"lineHeightPx":{"type":"number","minimum":0,"maximum":100000},"fontFamily":{"type":"string","minLength":1,"maxLength":255}},"required":["fontSizePx","lineHeightPx","fontFamily"],"additionalProperties":false},{"type":"null"}]},"headingCase":{"anyOf":[{"type":"string","enum":["sentence","title","uppercase","lowercase","unchanged"]},{"type":"null"}]}},"additionalProperties":false},"layout":{"type":"object","properties":{"pageWidthPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"cornerRadiusPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"sectionSpacingPx":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]}},"additionalProperties":false},"voice":{"type":"object","properties":{"tone":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"rules":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":32768},"example":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false},"assets":{"type":"object","properties":{"upsert":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"category":{"anyOf":[{"type":"string","enum":["logo","imagery","icon","photo","reference"]},{"type":"null"}]},"usage":{"anyOf":[{"type":"string","maxLength":32768},{"type":"null"}]},"altText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"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)$"}},"additionalProperties":false}},"remove":{"maxItems":100,"type":"array","items":{"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)$"}}},"additionalProperties":false}},"additionalProperties":false}},"required":["operationId","expectedRevision","changes"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"anyOf":[{"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)$"},{"type":"null"}]},"unchanged":{"type":"boolean"},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["color","typography","layout","tone","rule","asset"]},"action":{"type":"string","enum":["created","updated","removed","restored"]}},"required":["id","type","action"],"additionalProperties":false}}},"required":["revision","actionId","unchanged","changes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/design-system/assets/upload":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"uploadTeamDesignSystemAsset","summary":"Upload a design-system asset to WordPress media","description":"Uploads one image (PNG, JPEG, WebP, sanitized SVG), PDF, Word (DOCX), PowerPoint (PPT/PPTX), font (WOFF/WOFF2/TTF/OTF/EOT), JSON token file, UTF-8 guidance or source file (Markdown, text, JSONC, YAML, CSS/SCSS/Sass/Less, HTML, JS/JSX/TS/TSX, Vue/Svelte), or original ZIP of at most 100 MB to the team's WordPress Media Library. Match the filename extension to contentType; its schema lists accepted pairs. Supply file bytes as contentBase64, not a local path. References are retained files, downloaded privately as attachments; they are never executed or extracted. Reuse operationId and the same input after an uncertain response. Returns an attachmentId; add or replace its design-system asset record with updateTeamDesignSystem. Upload alone does not change the design-system revision. Requires the team context beta.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\p{Cc}]+$"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","font/woff","font/woff2","font/ttf","font/otf","application/vnd.ms-fontobject","application/json","text/markdown","text/plain","text/css","text/html","text/javascript","application/javascript","application/typescript","application/yaml","application/zip"],"description":"png: image/png; jpg|jpeg: image/jpeg; webp: image/webp; svg: image/svg+xml; pdf: application/pdf; docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document; ppt: application/vnd.ms-powerpoint; pptx: application/vnd.openxmlformats-officedocument.presentationml.presentation; woff: font/woff; woff2: font/woff2; ttf: font/ttf; otf: font/otf; eot: application/vnd.ms-fontobject; json: application/json; md|markdown: text/markdown; txt|md|markdown|jsonc|yaml|yml|css|scss|sass|less|html|htm|js|mjs|cjs|jsx|ts|tsx|vue|svelte: text/plain; css: text/css; html|htm: text/html; js|mjs|cjs|jsx: text/javascript; js|mjs|cjs|jsx: application/javascript; ts|tsx: application/typescript; yaml|yml: application/yaml; zip: application/zip"},"contentBase64":{"type":"string","minLength":4,"maxLength":133333336,"pattern":"^[A-Za-z0-9+/]*={0,2}$(?![\\s\\S])"}},"required":["operationId","filename","contentType","contentBase64"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\p{Cc}]+$"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","font/woff","font/woff2","font/ttf","font/otf","application/vnd.ms-fontobject","application/json","text/markdown","text/plain","text/css","text/html","text/javascript","application/javascript","application/typescript","application/yaml","application/zip"],"description":"png: image/png; jpg|jpeg: image/jpeg; webp: image/webp; svg: image/svg+xml; pdf: application/pdf; docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document; ppt: application/vnd.ms-powerpoint; pptx: application/vnd.openxmlformats-officedocument.presentationml.presentation; woff: font/woff; woff2: font/woff2; ttf: font/ttf; otf: font/otf; eot: application/vnd.ms-fontobject; json: application/json; md|markdown: text/markdown; txt|md|markdown|jsonc|yaml|yml|css|scss|sass|less|html|htm|js|mjs|cjs|jsx|ts|tsx|vue|svelte: text/plain; css: text/css; html|htm: text/html; js|mjs|cjs|jsx: text/javascript; js|mjs|cjs|jsx: application/javascript; ts|tsx: application/typescript; yaml|yml: application/yaml; zip: application/zip"},"contentBase64":{"type":"string","minLength":4,"maxLength":133333336,"pattern":"^[A-Za-z0-9+/]*={0,2}$(?![\\s\\S])"}},"required":["operationId","filename","contentType","contentBase64"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"filename":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\\\p{Cc}]+$"},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/svg+xml","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","font/woff","font/woff2","font/ttf","font/otf","application/vnd.ms-fontobject","application/json","text/markdown","text/plain","text/css","text/html","text/javascript","application/javascript","application/typescript","application/yaml","application/zip"],"description":"png: image/png; jpg|jpeg: image/jpeg; webp: image/webp; svg: image/svg+xml; pdf: application/pdf; docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document; ppt: application/vnd.ms-powerpoint; pptx: application/vnd.openxmlformats-officedocument.presentationml.presentation; woff: font/woff; woff2: font/woff2; ttf: font/ttf; otf: font/otf; eot: application/vnd.ms-fontobject; json: application/json; md|markdown: text/markdown; txt|md|markdown|jsonc|yaml|yml|css|scss|sass|less|html|htm|js|mjs|cjs|jsx|ts|tsx|vue|svelte: text/plain; css: text/css; html|htm: text/html; js|mjs|cjs|jsx: text/javascript; js|mjs|cjs|jsx: application/javascript; ts|tsx: application/typescript; yaml|yml: application/yaml; zip: application/zip"},"contentBase64":{"type":"string","minLength":4,"maxLength":133333336,"pattern":"^[A-Za-z0-9+/]*={0,2}$(?![\\s\\S])"}},"required":["operationId","filename","contentType","contentBase64"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"attachmentId":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","exclusiveMinimum":0,"maximum":100000000}},"required":["attachmentId","filename","contentType","size"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/teams/{teamId}/design-system/undo":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"undoTeamDesignSystemChange","summary":"Undo the last design-system change","description":"Restores the values and attachment references before the latest action as a new revision. actionId must be the current last action and expectedRevision must match. Earlier historical actions cannot be selected. Reuse operationId and identical input on retry. Requires the team context beta.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"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)$"}},"required":["operationId","expectedRevision","actionId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"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)$"}},"required":["operationId","expectedRevision","actionId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"operationId":{"type":"string","minLength":1,"maxLength":128},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"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)$"}},"required":["operationId","expectedRevision","actionId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"actionId":{"anyOf":[{"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)$"},{"type":"null"}]},"unchanged":{"type":"boolean"},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["color","typography","layout","tone","rule","asset"]},"action":{"type":"string","enum":["created","updated","removed","restored"]}},"required":["id","type","action"],"additionalProperties":false}}},"required":["revision","actionId","unchanged","changes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/plan-codes/{code}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getPlanCode","summary":"Get a plan code","description":"Returns the plan a redeem code grants, how long the plan lasts, whether the code can still be redeemed, and which of your teams can receive it.","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"The redeem code from the link."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"code":{"type":"string","description":"The redeem code, as issued."},"planCode":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"planName":{"type":"string","description":"Display name of the plan the code grants."},"grantDurationDays":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"How long the resulting plan lasts, in days. Null means it never expires."},"status":{"type":"string","enum":["redeemable","expired","disabled","exhausted"],"description":"Whether the code can be redeemed right now, and if not, why."},"redeemedByCaller":{"type":"boolean","description":"Whether the caller already redeemed this code (each person redeems once)."},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Team id."},"slug":{"type":"string","description":"Team slug."},"name":{"type":"string","description":"Team display name."},"eligibility":{"type":"string","enum":["eligible","already_on_plan","not_permitted","already_redeemed"],"description":"eligible: the caller can redeem for this team. already_on_plan: the team already holds an active grant for this plan. not_permitted: the caller cannot manage billing for this team. already_redeemed: this code was already redeemed for this team."}},"required":["id","slug","name","eligibility"],"additionalProperties":false},"description":"The caller's teams and whether the code can be redeemed for each."}},"required":["code","planCode","planName","grantDurationDays","status","redeemedByCaller","teams"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/plan-codes/{code}/redeem":{"post":{"security":[{"bearerAuth":[]}],"operationId":"redeemPlanCode","summary":"Redeem a plan code","description":"Puts a team on the plan the code grants. You must be able to manage the team's billing. Each person redeems a code once, and each team receives it once.","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"description":"The redeem code from the link."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"Team to put on the plan (id or slug)."}},"required":["teamId"]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"Team to put on the plan (id or slug)."}},"required":["teamId"]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"teamId":{"type":"string","minLength":1,"description":"Team to put on the plan (id or slug)."}},"required":["teamId"]}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"teamId":{"type":"string","description":"Team the code was redeemed for."},"teamSlug":{"type":"string","description":"Slug of that team."},"planCode":{"type":"string","enum":["free","go","plus","gold","enterprise","internal"],"description":"Plan code."},"planName":{"type":"string","description":"Display name of the granted plan."},"grantId":{"type":"string","description":"Plan grant the redemption created."},"expiresAt":{"anyOf":[{"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))$"},{"type":"null"}],"description":"When the granted plan ends. Null means it never expires."}},"required":["teamId","teamSlug","planCode","planName","grantId","expiresAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Teams"]}},"/v1/docs/pages/{slug}":{"get":{"operationId":"getDocsPage","summary":"Read one documentation page","description":"Returns one documentation page by slug, for example `publishing` or `api/spaces`, including its printable body. A leading slash is tolerated. Slug lookup ignores tier so any documented page is reachable. To read a published page by its docs-site path, pass that path to `GET /v1/docs/search`, which returns the page in full on an exact match.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"slug":{"type":"string","description":"Stable topic id, for example `publishing` or `api/spaces`."},"title":{"type":"string"},"summary":{"type":"string"},"category":{"type":"string","enum":["guide","cli","api","recipe","workflow","error"]},"tier":{"type":"string","enum":["essential","full","reference"]},"keywords":{"type":"array","items":{"type":"string"},"description":"Extra search terms that match this page."},"url":{"type":"string","format":"uri","description":"Canonical docs URL: the docs site page, or the docs API page for topics the docs site does not publish, such as recipes."},"links":{"type":"object","properties":{"doc":{"type":"string","format":"uri","description":"Canonical docs URL: the docs site page, or the docs API page for topics the docs site does not publish, such as recipes."},"self":{"type":"string","description":"API-relative link to this entry's JSON (`/v1/docs/pages/{slug}`)."}},"required":["doc","self"],"additionalProperties":false},"body":{"type":"string","description":"Short printable explanation of the topic."}},"required":["slug","title","summary","category","tier","keywords","url","links","body"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"tags":["Docs"],"parameters":[{"name":"slug","in":"path","required":true,"description":"The documentation page slug, for example `publishing` or `api/spaces`. A slug can contain `/`.","schema":{"type":"string"}}]}}}}