{"openapi":"3.1.0","info":{"title":"Spacefast API","version":"0.0.3","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.","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.","publish:write":"Publish new immutable versions.","domains:read":"Read domain inventory and DNS diagnostics.","domains:write":"Attach, verify, and mutate domains and DNS records.","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.","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.","publish:write":"Publish new immutable versions.","domains:read":"Read domain inventory and DNS diagnostics.","domains:write":"Attach, verify, and mutate domains and DNS records.","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."},"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 /__/<key> door."}},"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}}},"tags":[{"name":"Spaces","description":"Create, publish, claim, transfer, and manage spaces."},{"name":"Builds","description":"Remote source execution, build logs, retries, and cancellation."},{"name":"Versions","description":"Version lifecycle: upload, finalize, promote, and inspect."},{"name":"Domains","description":"Domain inventory, bindings, and space assignments."},{"name":"Variables","description":"Space and team variables resolved at publish time."},{"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 to scope the list.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":true,"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":"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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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.view.fast","publicName":"marketing-site","liveUrl":"https://marketing-site.view.fast/","dataLocation":"dca","channels":{"live":{"versionId":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","updatedAt":"2026-06-30T12:00:03.000Z"}},"config":null,"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 an empty space under a team with a chosen or generated slug. 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":{"anyOf":[{"type":"string"},{"type":"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"],"additionalProperties":false},"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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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},"dataLocation":{"type":"string","minLength":1}},"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":{"anyOf":[{"type":"string"},{"type":"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"],"additionalProperties":false},"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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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},"dataLocation":{"type":"string","minLength":1}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"teamId":{"anyOf":[{"type":"string"},{"type":"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"],"additionalProperties":false},"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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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},"dataLocation":{"type":"string","minLength":1}},"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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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 /__/<key> 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#<key> 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.view.fast","publicName":"marketing-site","liveUrl":"https://marketing-site.view.fast/","dataLocation":"dca","channels":{"live":{"versionId":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","updatedAt":"2026-06-30T12:00:03.000Z"}},"config":null,"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. Claim-token reads extend an anonymous space's expiry window.","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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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 view.fast hostname.","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 view.fast hostname. 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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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"}]},"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"}},"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.","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 view.fast hostname. 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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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"}]},"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"}},"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.","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 view.fast hostname. 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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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"}]},"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"}},"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.","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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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":"Marks the space deleted and queues teardown. Deletion is tombstone-first: serving stops immediately and cleanup completes asynchronously. With a space key (unclaimed space), deletion is two-phase instead: the site goes dark immediately but the row survives until the claim window expires, and POST /v1/spaces/:spaceId/restore with the same key undoes it.","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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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}/restore":{"post":{"operationId":"restoreSpace","summary":"Restore a space-key-deleted space","description":"Undoes a space-key deletion while the claim window is still open: the site comes back live under its original slug and URLs. Only author-removed spaces restore this way; the space key is the credential.","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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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}/transfer":{"post":{"operationId":"createSpaceTransfer","summary":"Request a space transfer","description":"Starts a tenant-local ownership transfer to another principal. The current owner keeps full control until the receiving side accepts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"description":"Space to transfer (`spc_`).","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"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"],"additionalProperties":false,"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["to"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"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"],"additionalProperties":false,"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["to"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"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"],"additionalProperties":false,"description":"Receiving principal. Must live in the space's tenant; cross-tenant transfers are unsupported."}},"required":["to"],"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":"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/space-transfers/{transferId}":{"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/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":true,"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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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","plan","defaultDataLocation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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]$"}},"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":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]$"}},"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":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]$"}},"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","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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional team logo URL."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque team metadata stored by the client."},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe customer id linked to this team; null until billing is initialized."}},"required":["id","tenantId","name","slug","role","plan","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional team logo URL."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque team metadata stored by the client."},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe customer id linked to this team; null until billing is initialized."}},"required":["id","tenantId","name","slug","role","plan","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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 the team's name, slug, logo, metadata, or default data location.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."}},"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":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":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."}},"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultDataLocation":{"type":"string","minLength":1,"maxLength":64,"description":"Default placement region for new spaces; \"auto\" lets placement decide."}},"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":"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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional team logo URL."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque team metadata stored by the client."},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe customer id linked to this team; null until billing is initialized."}},"required":["id","tenantId","name","slug","role","plan","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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 recover 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))$"},"recoverableUntil":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?: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","recoverableUntil"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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}/recover":{"post":{"security":[{"bearerAuth":[]}],"operationId":"recoverTeam","summary":"Recover a team","description":"Recovers a soft-deleted team and its cascaded memberships, invitations, and credentials within the 30-day recovery 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":true,"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."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Avatar URL, or null when the user has none."}},"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","createdAt","user"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":"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."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Avatar URL, or null when the user has none."}},"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","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/teams/{teamId}/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":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"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"},"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"},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":[]}],"operationId":"createTeamInvitation","summary":"Invite someone to a team","description":"Creates a pending invitation and emails the invitee a join link.","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":{"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":["email"],"additionalProperties":false}},"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,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["email"],"additionalProperties":false}},"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,}$"},"role":{"default":"member","type":"string","enum":["owner","admin","member"]}},"required":["email"],"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"},"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"},"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/teams/{teamId}/invitations/{invitationId}":{"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":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"invitationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"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 to accept (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":["Spaces"]}},"/v1/teams/{teamId}/domains":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listTeamDomains","summary":"List team domains","description":"Returns the team's domain inventory newest-first, after applying the caller's authorization.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"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":"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"addTeamDomain","summary":"Add a team domain","description":"Adds a domain to the team and starts DNS verification.","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":253,"description":"Apex or concrete hostname to add to inventory; canonicalized server-side."}},"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":"Apex or concrete hostname to add to inventory; canonicalized server-side."}},"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":"Apex or concrete hostname to add to inventory; canonicalized server-side."}},"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","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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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/teams/{teamId}/domains/preflight":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"preflightTeamDomain","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":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":253,"description":"Apex or concrete hostname to preflight; canonicalized server-side."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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"},"canHost":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Provider hostability verdict. `null` when the provider check was unavailable; treat as unknown, not as failure."},"providerMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Provider-reported reason when the verdict is negative."}},"required":["name","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/teams/{teamId}/domains/{domainId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getTeamDomain","summary":"Get a team domain","description":"Returns a domain with its DNS evidence, diagnostics, and semantic recovery actions.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","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":"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"updateTeamDomain","summary":"Assign a team domain","description":"Assigns or unassigns the domain, or changes its whole-host redirect. The response includes the runtime update operation.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","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","anyOf":[{"type":"object","properties":{"spaceId":{"type":"string","minLength":1},"primary":{"type":"boolean"},"redirect":{"anyOf":[{"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},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null"}},"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"],"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},{"type":"null"}]}},"required":["redirect"],"additionalProperties":false}]}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"spaceId":{"type":"string","minLength":1},"primary":{"type":"boolean"},"redirect":{"anyOf":[{"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},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null"}},"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"],"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},{"type":"null"}]}},"required":["redirect"],"additionalProperties":false}]}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"spaceId":{"type":"string","minLength":1},"primary":{"type":"boolean"},"redirect":{"anyOf":[{"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},{"type":"null"}]}},"required":["spaceId","primary"],"additionalProperties":false},{"type":"object","properties":{"spaceId":{"type":"null"}},"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"],"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},{"type":"null"}]}},"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"removeTeamDomain","summary":"Remove a team domain","description":"Removes an unused domain and its DNS data from the team's inventory.","responses":{"204":{"description":"The domain was removed."}},"parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"tags":["Domains"]}},"/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":true,"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":"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"api_key"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"oauth_client"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_claim"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"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","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":true,"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":"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"api_key"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"oauth_client"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_claim"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"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","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":true,"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":"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"Only events at or before this time.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"user"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"api_key"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"oauth_client"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"anonymous_claim"},"id":{"type":"string","minLength":1}},"required":["type","id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"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","principal","spaceId","actor","code","message","details","createdAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":true,"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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}/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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space the reported hostname resolved to."},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"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"}},"additionalProperties":false}},"required":["message"],"additionalProperties":false}},"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"}},"additionalProperties":false}},"required":["message"],"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":{"ref":{"type":"string"},"delivered":{"type":"boolean"}},"required":["ref","delivered"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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/beta/visitor":{"get":{"operationId":"getBetaVisitor","summary":"Read private-beta visitor status","description":"Returns whether the current browser request appears to come from an Automattician account or the Automattic proxy network. No user identity details are returned.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel=\"describedby\"` response header."},"data":{"type":"object","properties":{"isAutomattician":{"type":"boolean","description":"Whether the request belongs to an Automattician session or proxy network."},"source":{"anyOf":[{"type":"string","enum":["session","proxy"]},{"type":"null"}],"description":"The signal that established Automattician access, or null when none matched."}},"required":["isAutomattician","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":["Spaces"]}},"/v1/beta/signups":{"post":{"operationId":"createBetaSignup","summary":"Join the private-beta waitlist","description":"Adds an email address to the Spacefast private-beta waitlist and returns a generic acknowledgement. Submitting an address that is already on the waitlist returns the same acknowledgement.","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":"Address to put on the waitlist."},"website":{"description":"Honeypot field; leave empty.","type":"string"}},"required":["email"],"additionalProperties":false}},"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":"Address to put on the waitlist."},"website":{"description":"Honeypot field; leave empty.","type":"string"}},"required":["email"],"additionalProperties":false}},"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":"Address to put on the waitlist."},"website":{"description":"Honeypot field; leave empty.","type":"string"}},"required":["email"],"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":{"ok":{"type":"boolean","const":true,"description":"Generic acknowledgement; identical for every outcome."}},"required":["ok"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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/beta/accept":{"post":{"operationId":"acceptBetaInvite","security":[{"bearerAuth":[]}],"summary":"Accept a beta invite","description":"Redeems a private-beta invite token for the authenticated account: the waitlist signup is bound to the caller and the account is enrolled. Accepting again — or while already enrolled — succeeds idempotently.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":255,"description":"Raw invite token from the email link."}},"required":["token"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":255,"description":"Raw invite token from the email link."}},"required":["token"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":255,"description":"Raw invite token from the email link."}},"required":["token"],"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":{"enrolled":{"type":"boolean","const":true,"description":"The calling account is enrolled in the private beta."}},"required":["enrolled"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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":"Accepts registered, privacy-scoped events from first-party clients. Events are optional, rate-limited, and never carry personal data.","requestBody":{"content":{},"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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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 derived policy never exceeds what was requested. The full secret is returned only in this response; store it now.","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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":["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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":["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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":["scope","permissions"],"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","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"]}},"/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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"notBefore":{"description":"Replacement activation instant.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","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.","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","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"]}},"/v1/agent-context":{"get":{"operationId":"getAgentContext","summary":"Get scoped agent instructions","description":"Returns AGENT_PROSE fragments as Markdown for agent clients. Optional scopes filter by fragment key. Consumer applies whole-fragment token budgets.","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":true,"schema":{"default":"markdown","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","type":"string","enum":["cursor","mcp","markdown"]},"scopes":{"type":"array","items":{"type":"string"}},"markdown":{"type":"string"},"truncated":{"type":"boolean"},"omittedScopes":{"type":"array","items":{"type":"string"}}},"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":["Spaces"]}},"/v1/docs/ask":{"post":{"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"],"additionalProperties":false}},"page":{"type":"object","properties":{"path":{"type":"string","maxLength":512,"pattern":"^\\/.*"}},"required":["path"],"additionalProperties":false}},"required":["messages"],"additionalProperties":false}}},"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. 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The trimmed query, or null when listing."},"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."}},"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/page":{"get":{"operationId":"getDocsPage","summary":"Read one published documentation page","description":"Returns one published documentation page with its full Markdown body, addressed by its docs-site `path` or its `slug`. Pass exactly one of the two.","parameters":[{"name":"path","in":"query","required":false,"schema":{"description":"Docs-site path, for example `/publishing`.","type":"string","maxLength":512}},{"name":"slug","in":"query","required":false,"schema":{"description":"Stable page id, for example `api/spaces`.","type":"string","maxLength":512}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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 page."},"page":{"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"},"body":{"type":"string","description":"Full Markdown body of the page."}},"required":["slug","path","url","title","kind","tier","summary","body"],"additionalProperties":false}},"required":["revision","page"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The trimmed `q` query, or null when listing."},"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 human-readable docs URL."},"links":{"type":"object","properties":{"doc":{"type":"string","format":"uri","description":"Canonical human-readable docs URL."},"self":{"type":"string","description":"API-relative link to this entry's JSON (`/v1/docs/{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/webhooks":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listWebhooks","summary":"List webhooks","description":"Lists the webhooks on teams that your credential can read, newest first.","parameters":[{"name":"limit","in":"query","required":true,"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"},"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","principal","url","events","status","secretPreview","previousSecretExpiresAt","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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"},"tenantId":{"type":"string"},"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","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"},"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","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 rotate-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":{"url":{"type":"string","format":"uri"},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"status":{"type":"string","enum":["active","disabled"]}},"additionalProperties":false}},"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"]}},"additionalProperties":false}},"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"]}},"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"},"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","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.","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"},"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","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}/rotate-secret":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["spaces:write"]}],"operationId":"rotateWebhookSecret","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.","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"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expireNow":{"default":false,"type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expireNow":{"default":false,"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"},"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","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":true,"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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/webhook-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":"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/webhook-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":"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User email."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User display name."},"isAutomattician":{"type":"boolean","description":"Whether the linked WordPress.com account is an Automattician."},"wpcom":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Raw WordPress.com `/me` payload from the user's last WP.com login."},"isSuperadmin":{"type":"boolean","description":"Whether the user is a platform operator."},"pendingDeletionAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When this account's deletion was requested, while the close is still running. Null for every account that is not being deleted."},"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-prefs`."},"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","wpcom","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team slug."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caller's membership role. Null for policy-granted (non-member) access."},"plan":{"type":"string","enum":["free","personal","work","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","personal","work","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."},"beta":{"type":"object","properties":{"gateEnabled":{"type":"boolean","description":"Whether the `beta.enrollment_gate` flag is on for this environment."},"enrolled":{"type":"boolean","description":"Whether the subject user is enrolled (beta_enrolled_at is set)."},"wpcom":{"type":"boolean","description":"Whether the user passed the Automattician check at enrollment."},"eligibleTeams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string","description":"Team id."},"name":{"type":"string","description":"Team display name."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team slug."},"source":{"type":"string","enum":["invitation","auto_enroll_domain","automattician"],"description":"Why the team is joinable by the caller."}},"required":["teamId","name","slug","source"],"additionalProperties":false},"description":"Teams the user may join via the picker (pending invitation, auto-enroll match, or Automattician access)."}},"required":["gateEnabled","enrolled","wpcom","eligibleTeams"],"additionalProperties":false,"description":"Private-beta state. Dashboards key the blocked screen on `gateEnabled && !enrolled`, never on `!enrolled` alone. Otherwise, a launch-day flag-off still blocks people."}},"required":["subject","user","tenants","teams","intercom","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/connected-apps":{"get":{"operationId":"listConnectedApps","summary":"List the authenticated user's connected OAuth apps","description":"Returns each OAuth app that the user authorized. Includes client metadata, scopes, resources, and team access.","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":{"apps":{"type":"array","items":{"type":"object","properties":{"consentId":{"type":"string"},"clientId":{"type":"string"},"clientName":{"type":"string"},"clientUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"logoUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"scopes":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"type":"string"}},"teams":{"type":"object","properties":{"allTeams":{"type":"boolean"},"teamIds":{"type":"array","items":{"type":"string"}},"teamNames":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["allTeams","teamIds","teamNames"],"additionalProperties":false},"dormant":{"type":"boolean"},"grantedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["consentId","clientId","clientName","scopes","resources","teams","grantedAt","updatedAt"],"additionalProperties":false}}},"required":["apps"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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 authorized apps","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":[{"bearerAuth":[]}],"parameters":[{"name":"teamId","in":"query","required":false,"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":["oauth","device","handoff","api-key","machine"]},"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"},"activityUrl":{"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","activityUrl","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":[{"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":{"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":[{"bearerAuth":[]}],"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":["oauth","device","handoff","api-key","machine"]},"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"},"activityUrl":{"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","activityUrl","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":"Revoke one grant's access to a team","description":"Withdraws a team member's grant along with every credential bound to it. Only team administrators can do this, and only for grants whose scope reaches this team; the member keeps the grant nowhere else because revocation is total.","security":[{"bearerAuth":[]}],"parameters":[{"name":"teamRef","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"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":{"status":{"type":"string","const":"revoked"}},"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":["Teams"]}},"/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":[{"bearerAuth":[]}],"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestId":{"anyOf":[{"type":"string"},{"type":"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/grants/{grantId}":{"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":[{"bearerAuth":[]}],"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":{"status":{"type":"string","const":"revoked"}},"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/me/approvals":{"get":{"operationId":"listApprovals","summary":"List pending approvals","description":"Returns same-user confirmation and elevation requests. Pass teamId to enforce team visibility on the server.","security":[{"bearerAuth":[]}],"parameters":[{"name":"teamId","in":"query","required":false,"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":{"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"]},"grantId":{"type":"string"},"rationale":{"type":"string"},"requestedScopes":{"type":"array","items":{"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))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?: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":["Account"]}},"/v1/me/approvals/{decisionId}":{"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":[{"bearerAuth":[]}],"parameters":[{"name":"decisionId","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"}]},"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":["Account"]},"post":{"operationId":"resolveApproval","summary":"Approve or deny an agent decision","description":"Only the user who owns the requesting grant can decide. Denial is terminal; repeated approval returns the same receipt.","parameters":[{"name":"decisionId","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":{"decision":{"type":"string","enum":["approve","deny"]}},"required":["decision"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","deny"]}},"required":["decision"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","deny"]}},"required":["decision"],"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"},"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":["Account"]}},"/v1/me/dashboard-prefs":{"patch":{"operationId":"updateDashboardPrefs","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":[{"bearerAuth":[]}],"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":[{"bearerAuth":[]}],"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."}},"additionalProperties":false,"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."}},"additionalProperties":false,"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."}},"additionalProperties":false,"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.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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.","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"}},"additionalProperties":false}},"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"}},"additionalProperties":false}},"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"}},"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":{"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":true,"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/notifications":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listNotifications","summary":"List dashboard notifications","description":"Returns the signed-in user's notifications, newest first.","parameters":[{"name":"limit","in":"query","required":true,"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":true,"schema":{"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":{"notifications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["comment.created","comment.replied","thread.archived","thread.unarchived","mention"]},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"spaceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"threadId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatarUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","avatarUrl","color"],"additionalProperties":false},"path":{"anyOf":[{"type":"string"},{"type":"null"}]},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"link":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"hasMore":{"type":"boolean","description":"Whether another page exists after this one."}},"required":["nextCursor","hasMore"],"additionalProperties":false}},"required":["notifications","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":["Account"]}},"/v1/notifications/unread-count":{"get":{"security":[{"bearerAuth":[]}],"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":[{"bearerAuth":[]}],"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"}},"additionalProperties":false}},"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"}},"additionalProperties":false}},"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"}},"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":{"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}/collab/notify-email":{"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceCollabNotifyEmail","summary":"Opt an anonymous commenter into reply email","description":"Requires a current anonymous Comments bearer and verifies the Cast actor belongs to it.","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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/collab/notify-email/unsubscribe":{"get":{"security":[],"operationId":"unsubscribeCollabNotifyEmail","summary":"Unsubscribe an anonymous commenter from reply email","description":"Consumes a signed one-click token and disables reply email for that anonymous commenter.","parameters":[{"name":"token","in":"query","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":{"unsubscribed":{"type":"boolean"}},"required":["unsubscribed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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":true,"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"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human ref \"v{number}\"; null until the version reaches ready."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failedStage":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildId":{"anyOf":[{"type":"string"},{"type":"null"}]},"importedFromVersionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","status","failureCode","failureMessage","failedStage","manifestHash","buildId","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},"rationale":{"description":"Explains why this publish is needed. Automated mutation surfaces require this value and store it in the publish audit event.","type":"string","minLength":1,"maxLength":1024},"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. When every declared file lands, the version finalizes itself; the explicit finalize call remains available for recovery and replay.","type":"object","properties":{"channel":{"anyOf":[{"type":"string","const":"live"},{"type":"null"}]}},"additionalProperties":false},"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"],"additionalProperties":false},"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."},"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"],"additionalProperties":false,"~standard":{"vendor":"zod","version":1,"jsonSchema":{}}}}}},"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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"},{"type":"null"}],"description":"Created version id, or null when the manifest matched and nothing changed."},"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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."},"ignoredPaths":{"default":[],"description":"Manifest paths ignored by the server because the current plan does not allow them.","type":"array","items":{"type":"string"}}},"required":["versionId","upload","ignoredPaths"],"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":{"versionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Created version id, or null when the manifest matched and nothing changed."},"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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."},"ignoredPaths":{"default":[],"description":"Manifest paths ignored by the server because the current plan does not allow them.","type":"array","items":{"type":"string"}}},"required":["versionId","upload","ignoredPaths"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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/resume":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"resumeSpaceVersionUpload","summary":"Resume a version upload session","description":"Returns fresh upload instructions for an unfinished version, listing the files the runtime has not received yet.","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"},"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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."},"ignoredPaths":{"default":[],"description":"Manifest paths ignored by the server because the current plan does not allow them.","type":"array","items":{"type":"string"}}},"required":["versionId","upload","ignoredPaths"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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":true,"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}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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"]}},"/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. Anonymous claim tokens can poll this route to follow a publish.","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human ref \"v{number}\"; null until the version reaches ready."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failedStage":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildId":{"anyOf":[{"type":"string"},{"type":"null"}]},"importedFromVersionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","status","failureCode","failureMessage","failedStage","manifestHash","buildId","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.","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":{"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":{"channel":{"type":"string","const":"live"},"versionId":{"anyOf":[{"type":"string"},{"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"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["query","total","matched"],"additionalProperties":false}},"required":["channel","versionId","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":{"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":{"versionId":{"type":"string"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["query","total","matched"],"additionalProperties":false}},"required":["versionId","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":true,"schema":{"default":"source","description":"Which representation to read: the uploaded source or the served byte.","type":"string","enum":["source","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":["source","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}/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":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"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":{"type":"string","enum":["redirects","headers"]}},{"name":"path","in":"query","required":false,"schema":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"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.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, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live"]},{"type":"null"}]}},"additionalProperties":false},"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, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live"]},{"type":"null"}]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"channel":{"description":"Omit for live publish, or pass null to finalize the version without promoting it.","anyOf":[{"type":"string","enum":["live"]},{"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"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human ref \"v{number}\"; null until the version reaches ready."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failedStage":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildId":{"anyOf":[{"type":"string"},{"type":"null"}]},"importedFromVersionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","status","failureCode","failureMessage","failedStage","manifestHash","buildId","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"example":{"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,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://v1--marketing-site.view.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}}}},"default":{"description":"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/async":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"promoteSpaceVersionAsync","summary":"Promote a version (async)","description":"Queues promotion of a ready version to a channel (`live` by default) and returns the operation handle to poll.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","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":{"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}},"additionalProperties":false}},"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}},"additionalProperties":false}},"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}},"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"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human ref \"v{number}\"; null until the version reaches ready."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failedStage":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildId":{"anyOf":[{"type":"string"},{"type":"null"}]},"importedFromVersionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","status","failureCode","failureMessage","failedStage","manifestHash","buildId","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["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) and waits for the channel pointer to move. Use this for rollback: promote any earlier ready version.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","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":{"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}},"additionalProperties":false},"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}},"additionalProperties":false}},"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}},"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"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human ref \"v{number}\"; null until the version reaches ready."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},{"type":"null"}],"description":"Publish provenance: who/what produced this version."},"status":{"type":"string","enum":["building","prepared","created","uploading","uploaded","finalizing","ready","failed","expired","canceled"]},"failureCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"failedStage":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]},"buildId":{"anyOf":[{"type":"string"},{"type":"null"}]},"importedFromVersionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL (v{number}--{label}.view.fast form), computed once and stored at ready; survives slug changes, transfers, and channel repointing. Null before ready."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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},"runtimeCodeDetected":{"type":"boolean"},"buildLog":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","status","failureCode","failureMessage","failedStage","manifestHash","buildId","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},"example":{"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,"importedFromVersionId":null,"variables":null,"fileCount":2,"totalBytes":2560,"filesAddedCount":2,"filesChangedCount":0,"filesRemovedCount":0,"pendingUploads":[],"skippedPaths":[],"immutableUrl":"https://v1--marketing-site.view.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"}}}}},"default":{"description":"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}/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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version that the live space URL now points to, if any."},"pendingVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version that live traffic is trying to publish now, if any."},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Live space URL. It moves to the latest version after a successful publish to `live`."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"default":[],"type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["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","actions","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":false,"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"}},"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":{"default":[],"type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["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","actions","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":false,"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"}},"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":true,"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":true,"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.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"until","in":"query","required":false,"schema":{"description":"End of the log window.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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. An uncursored read starts at the beginning of the retained window; follow `pagination.nextCursor` as `?afterEventId=` to walk forward to the newest event. 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":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"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}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":["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":{"type":"string","minLength":1,"maxLength":2048}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"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":"object","properties":{"objects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"},"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))$"},"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","contentType","createdAt","size","uploaderId","sha256","url"],"additionalProperties":false}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["objects","cursor","hasMore"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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}/storage/{objectId}":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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. A capsule declares its schema. A worker does not declare its schema. A worker's tables are not distinguishable from a co-tenant's on the shared site, so use `db console` to read a worker's database. 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"},"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_]*$"}}},"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"},"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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this plan has been run against the space database. `null` when the control plane has no application record and cannot truthfully say."},"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`. A worker's tables are not declared anywhere and are not separable from a co-tenant's. 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":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"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":"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_]*$"},"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","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":"Start a complete database export","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 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}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":4096}},{"name":"limit","in":"query","required":true,"schema":{"default":500,"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":"object","properties":{"rows":{"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":{}}]}}},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["rows","cursor"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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"},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"get":{"operationId":"getSpaceDatabaseConsole","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/claim":{"post":{"operationId":"claimSpace","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Claim a space with its key","description":"Claims a Space or returns the one decision that is still required. Send the Space key and any selected team or agent consent. Repeat the request after login, team selection, or consent until the response is `claimed`. The server verifies eligibility.","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#<key> 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"}},"additionalProperties":false}},"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#<key> 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"}},"additionalProperties":false}},"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#<key> 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"}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"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"]}},"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":["Spaces"]}},"/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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["status"],"additionalProperties":false},"space":{"type":"object","properties":{"id":{"type":"string"},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","liveUrl"],"additionalProperties":false},"version":{"type":"object","properties":{"id":{"type":"string"},"ref":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","ref","number","status","immutableUrl","manifestHash"],"additionalProperties":false},"claim":{"type":"object","properties":{"state":{"type":"string","enum":["unclaimed","claimed"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Claim page link (/claim#<key>) while the space is unclaimed; null after."},"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":["Spaces"]}},"/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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/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"],"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}},"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}},"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":{"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 /__/<key> 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#<key> 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":["Spaces"]}},"/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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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"]}},{"name":"slug","in":"query","required":true,"schema":{"default":"","type":"string"}},{"name":"currentSlug","in":"query","required":false,"schema":{"type":"string"}},{"name":"teamId","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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Closest available slug when the requested one is taken; null when available."},"hostnameAvailable":{"description":"Whether the normalized slug's managed view.fast hostname can be used as-is.","type":"boolean"},"hostnameSuggestion":{"description":"Closest available public name when the managed hostname is taken.","anyOf":[{"type":"string"},{"type":"null"}]},"selectedHostname":{"description":"Managed view.fast hostname selected for the requested slug.","anyOf":[{"type":"string"},{"type":"null"}]},"hostnameConflictReason":{"description":"Stable reason code for the selected hostname conflict, when unavailable.","anyOf":[{"type":"string"},{"type":"null"}]},"globalHostnameAvailable":{"description":"Whether `{slug}.view.fast` is available.","type":"boolean"},"globalHostname":{"description":"The global managed hostname checked.","anyOf":[{"type":"string"},{"type":"null"}]},"globalHostnameSuggestion":{"description":"Closest available global public name when `{slug}.view.fast` is taken.","anyOf":[{"type":"string"},{"type":"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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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","personal","work","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."},"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."},"boughtDomains":{"type":"string","const":"unlimited","description":"Domains bought through Spacefast never count against external domain limits."},"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":"Files per version; plan policy may lower the 100,000-file contract ceiling, never raise it."},"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."},"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."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled monthly limit: pricing never separates user pushes from CI builds."}},"required":["storageBytes","teamMembers","subTeams","externalDomainGroups","boughtDomains","maxFileBytes","maxVersionFiles","routingRules","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysMonthly"],"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},"subTeams":{"type":"integer","minimum":0,"maximum":9007199254740991},"externalDomainGroups":{"type":"integer","minimum":0,"maximum":9007199254740991},"routingRules":{"type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysThisMonth":{"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","routing_rules_over_plan"],"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.","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"]},"desiredRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"appliedRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingChangeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable","routing","access","settings"]},"name":{"type":"string"},"label":{"type":"string"},"id":{"type":"string"},"sourceSurface":{"type":"string"},"applyMode":{"type":"string","enum":["stage","apply"]},"before":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"after":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","name","label","id","sourceSurface","applyMode"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"canApplyNow":{"type":"boolean"}},"required":["status","desiredRevision","appliedRevision","pendingChangeCount","changes","operation","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.","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":{"applied":{"type":"boolean"},"applyState":{"type":"object","properties":{"status":{"type":"string","enum":["live","pending","applying","failed"]},"desiredRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"appliedRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"pendingChangeCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changes":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable","routing","access","settings"]},"name":{"type":"string"},"label":{"type":"string"},"id":{"type":"string"},"sourceSurface":{"type":"string"},"applyMode":{"type":"string","enum":["stage","apply"]},"before":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"after":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["kind","name","label","id","sourceSurface","applyMode"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"canApplyNow":{"type":"boolean"}},"required":["status","desiredRevision","appliedRevision","pendingChangeCount","changes","operation","lastError","canApplyNow"],"additionalProperties":false}},"required":["applied","applyState"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"redirects":{"anyOf":[{"type":"string"},{"type":"null"}]},"headers":{"anyOf":[{"type":"string"},{"type":"null"}]},"diagnostics":{"type":"array","items":{"type":"object","properties":{"file":{"type":"string","enum":["_redirects","_headers","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version this channel currently serves, or null before first publish."},"currentDeploymentUrl":{"description":"Immutable URL of the currently-served version, when known.","anyOf":[{"type":"string"},{"type":"null"}]},"previousVersionId":{"description":"Last version this channel served before the current pointer (rollback target).","anyOf":[{"type":"string"},{"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))$","description":"Instant when this channel pointer last moved."},"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","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.","anyOf":[{"type":"string"},{"type":"null"}]},"actorType":{"description":"Kind of actor that performed the promotion.","anyOf":[{"type":"string","enum":["user","api_key","oauth_client","anonymous_claim","system"]},{"type":"null"}]},"actorId":{"description":"Identifier of the promoting actor.","anyOf":[{"type":"string"},{"type":"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}/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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Live version these declarations come from, or null before the first publish."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the exit status means on this runtime, when it maps to a known failure mode. Null when unknown."}},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What the exit status means on this runtime, when it maps to a known failure mode. Null when unknown."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Key the failure report named — an entry the live config no longer declares — or null when the report carried none."}},"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}/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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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. The new value applies when a version next finalizes; the live version keeps its sealed values.","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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. The deletion applies when a version next finalizes; the live version keeps its sealed values.","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]}},"/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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]}},"/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.","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]+$"}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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","pattern":"^(grt_)[A-Za-z0-9]+$"},"revoked":{"type":"boolean","const":true}},"required":["grantId","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}/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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]}},"/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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]}},"/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.","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":{"grantId":{"type":"string","pattern":"^(grt_)[A-Za-z0-9]+$"},"revoked":{"type":"boolean","const":true}},"required":["grantId","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}/grants":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceGrants","summary":"List active Space Grants","description":"Lists every non-revoked Grant and explains whether its config, system, or managed source can be edited here.","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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceGrant","summary":"Create a managed Space Grant","description":"Creates one managed Grant. The response includes the runtime update when it continues in the background.","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":"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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}/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":true,"schema":{"default":"/","type":"string","minLength":1,"maxLength":2048}},{"name":"target","in":"query","required":true,"schema":{"default":"live","type":"string","enum":["live","version","branch"]}},{"name":"targetId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"audience","in":"query","required":true,"schema":{"default":"public","type":"string","enum":["public","team","person","link","password","machine","external"]}},{"name":"personId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"passwordCredentialId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"machineId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"issuer","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"subject","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":255}},{"name":"verifiedEmail","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"ipAddress","in":"query","required":false,"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":{"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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","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":["Spaces"]}},"/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.","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},{"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":"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"],"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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"]},"delete":{"security":[{"bearerAuth":[]}],"operationId":"revokeSpaceGrant","summary":"Revoke a managed Space Grant","description":"Revokes one managed Grant after access is blocked and sessions disconnect. 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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/teams/{teamId}/access/defaults":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamAccessDefaults","summary":"Get the access default for new Spaces","description":"Returns the access mode automatically assigned to future Spaces in this Team.","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":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]}},"required":["newSpaceGrantPreset"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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"]},"put":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"setTeamAccessDefaults","summary":"Set the access default for new Spaces","description":"Changes only the root general-access template for future Spaces. Existing Spaces are unchanged.","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"]}},"required":["newSpaceGrantPreset"],"additionalProperties":false}},"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"]}},"required":["newSpaceGrantPreset"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]}},"required":["newSpaceGrantPreset"],"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":{"newSpaceGrantPreset":{"type":"string","enum":["private","team","public"]}},"required":["newSpaceGrantPreset"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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/spaces/{spaceId}/sharing/logout-all":{"post":{"operationId":"logoutAllSpaceSessions","security":[{"bearerAuth":[]}],"summary":"Emergency logout all Space sessions","description":"Invalidates every existing visitor session for this Space immediately.","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":["Spaces"]}},"/v1/spaces/{spaceId}/share-links":{"get":{"operationId":"listSpaceShareLinks","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"List 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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"post":{"operationId":"createSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Create a scoped Link","description":"Creates a stable visitor Link that opens only its configured path scopes.","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","comments.read","comments.write"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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"],"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},"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","comments.read","comments.write"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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"],"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},"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","comments.read","comments.write"],"minItems":1,"type":"array","items":{"type":"string","enum":["page.view","comments.read","comments.write"]}},"constraints":{"default":{},"type":"object","properties":{"notBefore":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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"],"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","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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/share-links/{linkId}":{"patch":{"operationId":"updateSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Update a 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.","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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},{"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"],"additionalProperties":false}},"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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},{"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"],"additionalProperties":false}},"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":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?: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":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"maxUses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"requireVerifiedEmail":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"network":{"anyOf":[{"type":"object","properties":{"ipCidrs":{"anyOf":[{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":64}},{"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"],"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","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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"delete":{"operationId":"revokeSpaceShareLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Revoke a Link","description":"Revokes a Link and invalidates visitor sessions derived from it.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","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},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/people":{"get":{"operationId":"listSpacePeople","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"List 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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"post":{"operationId":"inviteSpacePerson","security":[{"bearerAuth":[]}],"summary":"Invite a Person","description":"Invites a person by email with one or more scoped Space roles.","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"],"additionalProperties":false}}},"required":["email","grants"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["email","grants"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["email","grants"],"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/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.","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/people/{personId}/resend":{"post":{"operationId":"resendSpacePersonInvitation","security":[{"bearerAuth":[]}],"summary":"Resend a Person 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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/people/{personId}/grants":{"put":{"operationId":"replaceSpacePersonGrants","security":[{"bearerAuth":[]}],"summary":"Replace a Person's scoped roles","description":"Replaces every direct scoped role assigned to one person.","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"],"additionalProperties":false}}},"required":["grants"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["grants"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["grants"],"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/requests/{requestId}/approve":{"post":{"operationId":"approveSpaceAccessRequest","security":[{"bearerAuth":[]}],"summary":"Approve into People","description":"Approves a pending request and adds the requester to People.","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"]}},"additionalProperties":false}},"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"]}},"additionalProperties":false}},"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"]}},"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","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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/open":{"post":{"operationId":"createSpaceOpenLink","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Open a private Space","description":"Returns the reusable Open Link for an anonymous Space's live `/`. Targeted or account-authorized opens use an internal one-use browser handoff.","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}},"additionalProperties":false}},"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}},"additionalProperties":false}},"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}},"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":{"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/invitations/{invitationId}/preview":{"get":{"security":[{"bearerAuth":[]}],"operationId":"previewTeamInvitation","summary":"Preview a team invitation","description":"Returns the team name and masked invitee email for an invitation so the invite page can render before sign-in.","parameters":[{"name":"invitationId","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":"Invitation id."},"teamName":{"type":"string","description":"Inviting team's display name."},"invitedEmail":{"type":"string","description":"Masked invited email address."},"status":{"type":"string","enum":["pending","expired","closed"],"description":"Whether the invite can be accepted."},"expiresAt":{"type":"string","description":"Instant when the invitation expires."}},"required":["id","teamName","invitedEmail","status","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/teams/{teamId}/settings":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamSettings","summary":"Get team settings","description":"Returns team settings, including the default data location for new spaces.","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 settings belong to."},"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":["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 default data location for newly created spaces.","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."}},"required":["defaultDataLocation"],"additionalProperties":false}},"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."}},"required":["defaultDataLocation"],"additionalProperties":false}},"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."}},"required":["defaultDataLocation"],"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":{"teamId":{"type":"string","description":"The team id the settings belong to."},"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":["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","personal","work","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."},"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."},"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."},"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."},"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."}},"required":["storageBytes","teamMembers","subTeams","externalDomainGroups","maxFileBytes","maxVersionFiles","routingRules","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysMonthly","shareLinksPerSpace","invitesPerSpace","inviteEmailsPerSpaceDaily","inviteEmailsPerAccountDaily","pendingAccessRequestsPerSpace"],"additionalProperties":false},"externalProxy":{"type":"boolean","description":"Whether external proxy upstreams compile on this plan."},"dedicatedRuntime":{"type":"boolean","const":true,"description":"Every team receives its own runtime site."},"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."},"runtimePhpWorkers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"PHP workers per serving site."},"versionDiagnosticsIncluded":{"type":"boolean","description":"Whether version diagnostics are included with the plan."}},"required":["planCode","limits","externalProxy","dedicatedRuntime","pagesTemplates","hideSpacefastBranding","runtimePhpWorkers","versionDiagnosticsIncluded"],"additionalProperties":false,"description":"Resolved entitlements for a team: plan limits after add-on grants."}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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","personal","work","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."},"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."},"boughtDomains":{"type":"string","const":"unlimited","description":"Domains bought through Spacefast never count against external domain limits."},"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":"Files per version; plan policy may lower the 100,000-file contract ceiling, never raise it."},"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."},"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."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled monthly limit: pricing never separates user pushes from CI builds."}},"required":["storageBytes","teamMembers","subTeams","externalDomainGroups","boughtDomains","maxFileBytes","maxVersionFiles","routingRules","auditLogRetentionHours","buildAccessLogRetentionHours","buildsDeploysMonthly"],"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},"subTeams":{"type":"integer","minimum":0,"maximum":9007199254740991},"externalDomainGroups":{"type":"integer","minimum":0,"maximum":9007199254740991},"routingRules":{"type":"integer","minimum":0,"maximum":9007199254740991},"buildsDeploysThisMonth":{"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","routing_rules_over_plan"],"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}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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"},"planCode":{"type":"string","enum":["free","personal","work","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":{"anyOf":[{"type":"string"},{"type":"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","personal","work","enterprise","internal"],"description":"Plan code."},{"type":"null"}]},"status":{"type":"string"},"providerStatus":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Deprecated compatibility field."},"subscription":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","const":"stripe"},"planCode":{"anyOf":[{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Plan code."},{"type":"null"}]},"status":{"type":"string"},"providerStatus":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"boolean"},{"type":"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},"buildsDeploysThisMonth":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Publishes and builds pooled into one monthly meter."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Pooled monthly plan limit for publishes and builds."}},"required":["storageBytes","storageQuotaBytes","storageOverageBytes","buildsDeploysThisMonth","buildsDeploysMonthly"],"additionalProperties":false}},"required":["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 in the team."},"domains":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"External domain groups counted against the plan."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"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."},"buildsDeploysThisMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Publishes (user pushes and CI builds pooled) this month."},"buildsDeploysMonthly":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","const":"unlimited"}],"description":"Monthly publish limit for the plan."},"meterStartedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instant when the current metering month started."}},"required":["spaces","domains","members","storageBytes","storageQuotaBytes","storageOverageBytes","storageCalculatedAt","buildsDeploysThisMonth","buildsDeploysMonthly","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}/join":{"post":{"security":[{"bearerAuth":[]}],"operationId":"joinTeam","summary":"Join a team","description":"Adds you to a team as a member when your email matches one of the team's pending invitations, auto-enroll entries, or Automattician access for the main Automattic 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","const":"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":[{"bearerAuth":[]}],"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}/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":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"invitationId","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"},"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"},"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/teams/{teamId}/auto-enroll":{"get":{"security":[{"bearerAuth":[]}],"operationId":"listTeamAutoEnrollEntries","summary":"List a team's auto-enroll entries","description":"Returns the domains whose new sign-ins are auto-enrolled in the private beta and offered this team in the join picker.","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","description":"Auto-enroll entry id."},"teamId":{"type":"string","description":"Team the entry belongs to."},"kind":{"type":"string","const":"domain","description":"Auto-enroll entry kind."},"value":{"type":"string","description":"IDNA ASCII-canonicalized 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":[]}],"operationId":"createTeamAutoEnrollEntry","summary":"Add an auto-enroll entry to a team","description":"Adds a domain to the team's auto-enroll list. Matching sign-ins are enrolled in the private beta and offered this team in the join picker. Free-mail and Automattic domains cannot be added.","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":{"type":"string","const":"domain","description":"Auto-enroll is domain-only."},"value":{"type":"string","minLength":1,"maxLength":320,"description":"Domain to auto-enroll; validated and canonicalized server-side."}},"required":["kind","value"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","const":"domain","description":"Auto-enroll is domain-only."},"value":{"type":"string","minLength":1,"maxLength":320,"description":"Domain to auto-enroll; validated and canonicalized server-side."}},"required":["kind","value"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","const":"domain","description":"Auto-enroll is domain-only."},"value":{"type":"string","minLength":1,"maxLength":320,"description":"Domain to auto-enroll; validated and canonicalized server-side."}},"required":["kind","value"],"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":"Auto-enroll entry id."},"teamId":{"type":"string","description":"Team the entry belongs to."},"kind":{"type":"string","const":"domain","description":"Auto-enroll entry kind."},"value":{"type":"string","description":"IDNA ASCII-canonicalized 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":[]}],"operationId":"deleteTeamAutoEnrollEntry","summary":"Remove an auto-enroll entry from a team","description":"Deletes one of the team's auto-enroll entries so matching sign-ins are no longer enrolled or offered this team.","responses":{"204":{"description":"The auto-enroll entry was 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}/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":true,"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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","git","operation","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/teams/{teamId}/domains/{domainId}/diagnostics":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getTeamDomainDiagnostics","summary":"Get domain diagnostics","description":"Returns DNS observations and setup diagnostics for one of the team's domains.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected TXT verification value."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether observed A records look proxied."},"txtVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the verification TXT is observed."},"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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","mx","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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","mx","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"validationExpiration":{"anyOf":[{"type":"string"},{"type":"null"}]},"authzUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryDate":{"anyOf":[{"type":"string"},{"type":"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/teams/{teamId}/domains/{domainId}/check":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"checkTeamDomain","summary":"Check a domain's DNS again","description":"Checks the domain's DNS records, updates verification state, and syncs the bound space runtime when needed.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","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":"This check refreshes stored DNS state. Re-read the domain for the result."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/teams/{teamId}/domains/{domainId}/ssl/retry":{"post":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"retryTeamDomainSsl","summary":"Retry SSL issuance for a domain","description":"Retries SSL certificate issuance for a bound domain and returns updated diagnostics.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"domainId","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":{"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))$"},"retries":{"type":"array","items":{"type":"object","properties":{"hostname":{"type":"string"},"queued":{"type":"boolean"},"error":{"anyOf":[{"type":"string","enum":["not_hosted_here"]},{"type":"null"}]}},"required":["hostname","queued","error"],"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected TXT verification value."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether observed A records look proxied."},"txtVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the verification TXT is observed."},"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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","mx","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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","mx","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"validationExpiration":{"anyOf":[{"type":"string"},{"type":"null"}]},"authzUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryDate":{"anyOf":[{"type":"string"},{"type":"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}}},"required":["requestedAt","retries","hostnameDiagnostics"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/bootstrap":{"get":{"operationId":"getBootstrap","summary":"Boot a session in one request","description":"Returns your identity, the teams you can act for, and — when you name them — the resolved team, the resolved space, and that space's serving status. A ref that does not resolve is reported in its own slot with the problem that stopped it, so the rest of the payload still arrives; only a failure to establish identity fails the request. Read a value through `status: \"resolved\"` and nowhere else.","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User email."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User display name."},"isAutomattician":{"type":"boolean","description":"Whether the linked WordPress.com account is an Automattician."},"wpcom":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"Raw WordPress.com `/me` payload from the user's last WP.com login."},"isSuperadmin":{"type":"boolean","description":"Whether the user is a platform operator."},"pendingDeletionAt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When this account's deletion was requested, while the close is still running. Null for every account that is not being deleted."},"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-prefs`."},"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","wpcom","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team slug."},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The caller's membership role. Null for policy-granted (non-member) access."},"plan":{"type":"string","enum":["free","personal","work","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","personal","work","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."},"beta":{"type":"object","properties":{"gateEnabled":{"type":"boolean","description":"Whether the `beta.enrollment_gate` flag is on for this environment."},"enrolled":{"type":"boolean","description":"Whether the subject user is enrolled (beta_enrolled_at is set)."},"wpcom":{"type":"boolean","description":"Whether the user passed the Automattician check at enrollment."},"eligibleTeams":{"type":"array","items":{"type":"object","properties":{"teamId":{"type":"string","description":"Team id."},"name":{"type":"string","description":"Team display name."},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Team slug."},"source":{"type":"string","enum":["invitation","auto_enroll_domain","automattician"],"description":"Why the team is joinable by the caller."}},"required":["teamId","name","slug","source"],"additionalProperties":false},"description":"Teams the user may join via the picker (pending invitation, auto-enroll match, or Automattician access)."}},"required":["gateEnabled","enrolled","wpcom","eligibleTeams"],"additionalProperties":false,"description":"Private-beta state. Dashboards key the blocked screen on `gateEnabled && !enrolled`, never on `!enrolled` alone. Otherwise, a launch-day flag-off still blocks people."}},"required":["subject","user","tenants","teams","intercom","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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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","plan","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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."},"plan":{"type":"string","enum":["free","personal","work","enterprise","internal"],"description":"Resolved plan code from the active subscription."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional team logo URL."},"metadata":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque team metadata stored by the client."},"stripeCustomerId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stripe customer id linked to this team; null until billing is initialized."}},"required":["id","tenantId","name","slug","role","plan","defaultDataLocation","createdAt","updatedAt","logo","metadata","stripeCustomerId"],"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"},"providerRef":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud `atomic_site_id` serving this space."},"providerClientId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"WP Cloud client identity (`pvc_...`) the space's site is provisioned under."},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"teamSlug":{"anyOf":[{"type":"string"},{"type":"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"}]},"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","abuse_takedown","tenant_suspended","site_suspended","author_removed"],"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 view.fast. Renaming the space changes this hostname; previously managed hostnames temporarily redirect to the current one."},"publicName":{"type":"string","description":"Public space label used in the managed view.fast 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":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether this space's site can burst provider PHP workers."},"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 `<name>.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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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."},"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. Immutable version and preview hostnames are always noindex regardless of this setting."},"git":{"anyOf":[{"type":"object","properties":{"managedBy":{"type":"string","enum":["spacefast","github"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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","tenantId","providerRef","providerClientId","teamId","teamSlug","principal","anonymous","slug","title","status","disabled","claimState","defaultHostname","publicName","liveUrl","thumbnail","dataLocation","region","burstable","archivedBytes","hasRuntime","channels","config","settingsDigest","noindex","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version that the live space URL now points to, if any."},"pendingVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version that live traffic is trying to publish now, if any."},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Live space URL. It moves to the latest version after a successful publish to `live`."},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"default":[],"type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["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","actions","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":false,"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"}},"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":{"default":[],"type":"array","items":{"type":"string"}},"endpoints":{"default":[],"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","HEAD","POST","PUT","PATCH","DELETE","OPTIONS"]},"path":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^\\/.*"}},"required":["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","actions","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":false,"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"}},"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":true,"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":"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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 repository or source archive","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 a Build-owned upload instruction.","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":{"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"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","repositoryConnectionId"],"additionalProperties":false}],"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}},"additionalProperties":false},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"additionalProperties":false},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}},"wait":{"default":false,"type":"boolean"}},"required":["input"],"additionalProperties":false}},"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":"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"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","repositoryConnectionId"],"additionalProperties":false}],"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}},"additionalProperties":false},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"additionalProperties":false},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}},"wait":{"default":false,"type":"boolean"}},"required":["input"],"additionalProperties":false}},"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":"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"},"pullRequestNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["kind","repositoryConnectionId"],"additionalProperties":false}],"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}},"additionalProperties":false},"target":{"type":"object","properties":{"channel":{"default":null,"description":"Channel to promote when the build succeeds; null means no automatic promotion.","anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"preview":{"default":false,"description":"Whether the build targets preview behavior.","type":"boolean"}},"additionalProperties":false},"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}},"wait":{"default":false,"type":"boolean"}},"required":["input"],"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":{"build":{"type":"object","properties":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/wordpress":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceWordpressBuildReadiness","summary":"Check whether a WordPress source can trigger production builds","description":"Checks the configured WordPress source and connected production repository without exposing repository or build details.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sourceUrl","in":"query","required":true,"schema":{"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."}}],"responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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}},"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"]},"post":{"security":[{"bearerAuth":[]}],"operationId":"createSpaceWordpressBuild","summary":"Create a production build for a WordPress source","description":"Creates a build from the connected production repository with its saved settings and live target. The caller cannot select source code, commands, settings, refs, or publish targets.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Client-generated key, at most 255 characters, that identifies this build trigger. A request without it fails with 422 `idempotency_key_required`. 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","type":"object","properties":{"sourceUrl":{"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":["sourceUrl"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceUrl":{"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":["sourceUrl"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sourceUrl":{"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":["sourceUrl"],"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":{"build":{"type":"object","properties":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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}/uploads/{uploadId}":{"put":{"security":[{"bearerAuth":[]}],"operationId":"uploadSpaceBuildSourceArchive","summary":"Upload bytes for a Build-owned upload instruction","description":"Uploads bytes for the Build-owned upload instruction returned by build creation. The owning build is queued after the source archive lands in staging storage.","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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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}/uploads/resume":{"post":{"security":[{"bearerAuth":[]}],"operationId":"resumeBuildSourceUpload","summary":"Refresh a Build-owned upload instruction","description":"Returns a fresh upload instruction for an archive build that is still waiting for source archive upload.","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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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 (idempotent; terminal states returned unchanged)","description":"Cancels a queued, uploading, or running build and returns the latest build state.","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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":"Build runner 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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"Build 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":true,"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","system"]},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","versionId"],"additionalProperties":false}}},"required":["tagSetId","environment","versionId","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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["team","space","system"]},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","versionId"],"additionalProperties":false}}},"required":["tagSetId","environment","versionId","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":{"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"]},"versionId":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["version","categories","categoryDefinitions","defaultByCategory","regionDefaults","privacySignals","tags","diagnostics"],"additionalProperties":false}},"required":["environment","versionId","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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"inherited":{"type":"boolean"},"teamTagSetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string"},"disabled":{"default":false,"type":"boolean"},"reason":{"default":null,"anyOf":[{"type":"string"},{"type":"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"],"additionalProperties":false}}},"additionalProperties":false}},"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"],"additionalProperties":false}}},"additionalProperties":false}},"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"],"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":{"spaceId":{"type":"string"},"teamId":{"anyOf":[{"type":"string"},{"type":"null"}]},"inherited":{"type":"boolean"},"teamTagSetId":{"anyOf":[{"type":"string"},{"type":"null"}]},"overrides":{"type":"array","items":{"type":"object","properties":{"tagId":{"type":"string"},"disabled":{"default":false,"type":"boolean"},"reason":{"default":null,"anyOf":[{"type":"string"},{"type":"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"},"versionId":{"anyOf":[{"type":"string"},{"type":"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","versionId","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 version 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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"type":"string"}},"required":["id","tagSetId","environment","versionId","previousVersionId","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 version 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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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":"releaseSpaceTagVersion","summary":"Release an approved tag version","description":"Moves a space environment to an approved tag version 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":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"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"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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/versions":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceTagVersions","summary":"List tag versions","description":"Lists draft, review, approved, released, and abandoned tag versions for the space.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"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":{"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"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"createSpaceTagVersion","summary":"Create a draft tag version","description":"Creates a mutable space tag version from an optional base version 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 version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}}},"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":{"id":{"type":"string"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagVersion","summary":"Read a tag version","description":"Returns one space tag version with its lifecycle status, metadata, and graph revision.","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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":"updateSpaceTagVersion","summary":"Update mutable tag version metadata","description":"Updates the title or description for a space tag version that has not been abandoned.","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":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"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},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"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},"description":{"anyOf":[{"type":"string","maxLength":4000},{"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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/graph":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"getSpaceTagVersionGraph","summary":"Read a tag version graph","description":"Returns the editable graph and revision counter for a specific space tag 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"},"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":["versionId","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":"replaceSpaceTagVersionGraph","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":"versionId","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"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":{"versionId":{"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":["versionId","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":"patchSpaceTagVersionGraph","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":"versionId","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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}}},"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":{"versionId":{"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":["versionId","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/versions/{versionId}/validate":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"validateSpaceTagVersion","summary":"Validate a tag version","description":"Runs policy, template, consent, trigger, and dependency validation for the selected space tag 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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/versions/{versionId}/diff":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"diffSpaceTagVersion","summary":"Diff a tag version","description":"Compares a space tag version with its base version and reports graph-level changes.","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":{"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetVersionId":{"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":["baseVersionId","targetVersionId","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 version 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":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"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"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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"]}},"additionalProperties":false}},"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"]}},"additionalProperties":false}},"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"]}},"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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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 version 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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}},"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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}},"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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}}},"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":{"version":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false},{"type":"null"}]}},"required":["version","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/versions/{versionId}/submit":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"submitSpaceTagVersion","summary":"Submit a tag version","description":"Moves a draft space tag version into review after validating that the graph is ready.","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/approve":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"approveSpaceTagVersion","summary":"Approve a tag version","description":"Approves a reviewed space tag version so it can be released to an environment.","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/abandon":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"abandonSpaceTagVersion","summary":"Abandon a mutable tag version","description":"Marks a draft or review space tag version as abandoned without changing released environments.","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/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 version for a chosen URL or environment.","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":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}},"additionalProperties":false}},"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"]}},"additionalProperties":false}},"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"]}},"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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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/versions/{versionId}/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":"versionId","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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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/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":{"anyOf":[{"type":"string"},{"type":"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 version 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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"type":"string"}},"required":["id","tagSetId","environment","versionId","previousVersionId","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"},"versionId":{"anyOf":[{"type":"string"},{"type":"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","versionId","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 version 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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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":"releaseTeamTagVersion","summary":"Release an approved team tag version","description":"Moves a team environment to an approved tag version 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":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"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"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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 version 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":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"versionId":{"type":"string","minLength":1},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"releaseNotes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"required":["versionId"],"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"},"tagSetId":{"type":"string"},"environment":{"type":"string","enum":["production","preview","development"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","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/versions":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"listTeamTagVersions","summary":"List team tag versions","description":"Lists draft, review, approved, released, and abandoned tag versions for the team.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":true,"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":{"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"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","status","title","description","graph","graphRevision","validation","effectiveInputDigest","staticDigest","dynamicDigest","sdkRevision","createdAt","updatedAt","publishedAt","immutableAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"createTeamTagVersion","summary":"Create a draft team tag version","description":"Creates a mutable team tag version from an optional base version 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 version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"default":"Draft tag version","type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]},"baseVersionId":{"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."}},"additionalProperties":false}}},"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":{"id":{"type":"string"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamTagVersion","summary":"Read a team tag version","description":"Returns one team tag version with its lifecycle status, metadata, and graph revision.","parameters":[{"name":"teamId","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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":"updateTeamTagVersion","summary":"Update mutable team tag version metadata","description":"Updates the title or description for a team tag version that has not been abandoned.","parameters":[{"name":"teamId","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":{"title":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"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},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}]}},"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},"description":{"anyOf":[{"type":"string","maxLength":4000},{"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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/graph":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"getTeamTagVersionGraph","summary":"Read a team tag graph","description":"Returns the editable graph and revision counter for a specific team tag version.","parameters":[{"name":"teamId","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"},"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":["versionId","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":"replaceTeamTagVersionGraph","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":"versionId","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"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":{"versionId":{"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":["versionId","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":"patchTeamTagVersionGraph","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":"versionId","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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}},"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"],"additionalProperties":false}}},"required":["baseGraphRevision","operations"],"additionalProperties":false}}},"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":{"versionId":{"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":["versionId","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/versions/{versionId}/validate":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"validateTeamTagVersion","summary":"Validate a team tag version","description":"Runs policy, template, consent, trigger, and dependency validation for the selected team tag version.","parameters":[{"name":"teamId","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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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/versions/{versionId}/diff":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:read"]}],"operationId":"diffTeamTagVersion","summary":"Diff a team tag version","description":"Compares a team tag version with its base version and reports graph-level changes.","parameters":[{"name":"teamId","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":{"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"targetVersionId":{"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":["baseVersionId","targetVersionId","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 version 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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}},"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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}},"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"]},"expectedCurrentVersionId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["config"],"additionalProperties":false}}},"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":{"version":{"type":"object","properties":{"id":{"type":"string"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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"]},"versionId":{"type":"string"},"previousVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"type":"string"},"staticDigest":{"type":"string"},"releaseNotes":{"anyOf":[{"type":"string"},{"type":"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","versionId","previousVersionId","sdkRevision","staticDigest","releaseNotes","releasedAt","artifact"],"additionalProperties":false},{"type":"null"}]}},"required":["version","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/versions/{versionId}/submit":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"submitTeamTagVersion","summary":"Submit a team tag version","description":"Moves a draft team tag version into review after validating that the graph is ready.","parameters":[{"name":"teamId","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/approve":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"approveTeamTagVersion","summary":"Approve a team tag version","description":"Approves a reviewed team tag version so it can be released to an environment.","parameters":[{"name":"teamId","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/abandon":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["teams:create"]}],"operationId":"abandonTeamTagVersion","summary":"Abandon a team tag version","description":"Marks a draft or review team tag version as abandoned without changing released environments.","parameters":[{"name":"teamId","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"},"tagSetId":{"type":"string"},"versionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"baseVersionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","in_review","approved","publishing","published","abandoned"]},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"staticDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"dynamicDigest":{"anyOf":[{"type":"string"},{"type":"null"}]},"sdkRevision":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"immutableAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tagSetId","versionNumber","baseVersionId","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/versions/{versionId}/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 version for a chosen URL or environment.","parameters":[{"name":"teamId","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":{"url":{"type":"string","format":"uri"},"ttlSeconds":{"default":3600,"type":"integer","minimum":60,"maximum":86400},"environment":{"default":"production","type":"string","enum":["production","preview","development"]}},"additionalProperties":false}},"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"]}},"additionalProperties":false}},"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"]}},"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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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/versions/{versionId}/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":"versionId","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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","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"},"versionId":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","versionId","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}/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":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"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":"Creates a team-owned OIDC or signed-identity connection for external audience Grants.","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":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"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":"Updates a team identity connection and preserves every Grant that references its stable identity.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"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.","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionId","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","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"clientSecretSet":{"type":"boolean"},"authorizeUrl":{"anyOf":[{"type":"string"},{"type":"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/spaces/{spaceId}/external-grants":{"post":{"operationId":"createSpaceExternalGrant","security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"summary":"Grant external identity access","description":"Creates a canonical scoped Grant for a subject authenticated by a team identity 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":{"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["connectionId","subject","name","resources","capabilities","target"],"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["connectionId","subject","name","resources","capabilities","target"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connectionId":{"type":"string","pattern":"^(acn_)[A-Za-z0-9]+$"},"subject":{"type":"string","minLength":1,"maxLength":255},"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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["connectionId","subject","name","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":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|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))$"},"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}},"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}},"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":["Spaces"]}},"/v1/spaces/{spaceId}/collaboration":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getSpaceCollaboration","summary":"Get space collaboration settings","description":"Returns the Collab settings for a team-owned space.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"castResourceKey":{"anyOf":[{"type":"string"},{"type":"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 space collaboration settings","description":"Updates the supplied Collab fields when `expectedRevision` is current. If the revision is stale, returns 409 with the current Collab settings.","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},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"required":["expectedRevision","settings"],"additionalProperties":false}},"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},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"required":["expectedRevision","settings"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"settings":{"type":"object","properties":{"spamFilterEnabled":{"type":"boolean"},"surface":{"type":"string","enum":["off","previews","everywhere"]},"embedOrigins":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":255}},"notificationPreferences":{"type":"object","properties":{"newThreads":{"type":"boolean"},"newReplies":{"type":"boolean"},"statusChanges":{"type":"boolean"}},"additionalProperties":false}},"additionalProperties":false}},"required":["expectedRevision","settings"],"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"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"castResourceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"castResourceKey":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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 with cursor-safe 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":true,"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":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","archived"]}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","enum":["open","archived","spam"]}},{"name":"pagePath","in":"query","required":false,"schema":{"type":"string","maxLength":2048}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":160}},{"name":"author","in":"query","required":false,"schema":{"type":"string","maxLength":160}},{"name":"unread","in":"query","required":false,"schema":{"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":"array","items":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":true,"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":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","archived"]}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","enum":["open","archived","spam"]}},{"name":"pagePath","in":"query","required":false,"schema":{"type":"string","maxLength":2048}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":160}},{"name":"author","in":"query","required":false,"schema":{"type":"string","maxLength":160}},{"name":"unread","in":"query","required":false,"schema":{"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":"array","items":{"type":"object","properties":{"id":{"type":"string"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"Creates a comment thread against a specific version and page target.","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":"/","type":"string","minLength":1,"maxLength":2048},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"additionalProperties":false}},"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},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pagePath":{"default":"/","type":"string","minLength":1,"maxLength":2048},"body":{"type":"string","minLength":1,"maxLength":16000},"target":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"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"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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":true,"schema":{"default":"markdown","type":"string","enum":["markdown","json"]}},{"name":"status","in":"query","required":false,"schema":{"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/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":true,"schema":{"default":"markdown","type":"string","enum":["markdown","json"]}},{"name":"status","in":"query","required":false,"schema":{"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 a single comment thread by its public 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":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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":"Update a comment","description":"Updates mutable comment thread state.","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"]}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","archived"]}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["open","archived"]}},"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"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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 an existing 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":{"body":{"type":"string","minLength":1,"maxLength":16000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"additionalProperties":false}},"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},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":16000},"idempotencyKey":{"type":"string","minLength":1,"maxLength":320}},"required":["body"],"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","enum":["inserted","existing"]},"comment":{"type":"object","properties":{},"additionalProperties":{}}},"required":["status","comment"],"additionalProperties":{}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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}/archive":{"post":{"security":[{"bearerAuth":[]}],"operationId":"archiveSpaceComment","summary":"Archive a comment","description":"Archives a comment thread and records the activity event.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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}/unarchive":{"post":{"security":[{"bearerAuth":[]}],"operationId":"unarchiveSpaceComment","summary":"Unarchive a comment","description":"Returns an archived comment thread to open.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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}/not-spam":{"post":{"security":[{"bearerAuth":[]}],"operationId":"markSpaceCommentNotSpam","summary":"Mark a comment as not spam","description":"Marks a held comment or reply as not spam.","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","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"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"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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}/spam":{"post":{"security":[{"bearerAuth":[]}],"operationId":"markSpaceCommentSpam","summary":"Mark a comment as spam","description":"Marks a comment or reply as spam.","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","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"commentId":{"type":"string","minLength":1}},"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"},"castThreadId":{"type":"string"},"spaceId":{"type":"string"},"versionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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 the comment as read for the signed-in user.","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel":{"anyOf":[{"type":"string"},{"type":"null"}]},"pagePath":{"type":"string","maxLength":2048},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["open","archived"]},"moderationState":{"type":"string","enum":["clear","spam"]},"heldCommentIds":{"type":"array","items":{"type":"string"}},"unread":{"type":"boolean"},"unreadCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"body":{"anyOf":[{"type":"string"},{"type":"null"}]},"author":{"anyOf":[{"type":"object","properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"profileId":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}},"required":["count","actors"],"additionalProperties":false}},"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","contentType","size","kind","url"],"additionalProperties":false}}},"required":["attachments"],"additionalProperties":{}}},"permalink":{"anyOf":[{"type":"string"},{"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","castThreadId","spaceId","versionId","channel","pagePath","url","status","moderationState","heldCommentIds","unread","unreadCount","body","author","target","reactions","attachments","comments","permalink","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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"room_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"current":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","current","url"],"additionalProperties":false},"space":{"type":"object","properties":{"live_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["live_url"],"additionalProperties":false},"theme":{"type":"object","properties":{"accent":{"anyOf":[{"type":"string"},{"type":"null"}]},"hide_branding":{"type":"boolean"}},"required":["accent","hide_branding"],"additionalProperties":false},"ws_url":{"anyOf":[{"type":"string"},{"type":"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","notices"],"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 embed Comments 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"],"additionalProperties":false},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"],"additionalProperties":false}},"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"],"additionalProperties":false},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"],"additionalProperties":false}},"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"],"additionalProperties":false},"visitorToken":{"type":"string","minLength":1,"maxLength":2048}},"required":["identity"],"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"},"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/domains":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listDomains","summary":"List domain inventory records","description":"Returns domain inventory records across the caller teams, newest first. Pass `teamId` to limit the result to one team.","parameters":[{"name":"limit","in":"query","required":true,"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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":"Creates a domain inventory record (apex or concrete hostname). Assign it to a space with PATCH /v1/teams/{teamId}/domains/{domainId}.","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":"Apex or concrete hostname to add to inventory; canonicalized server-side."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"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":"Apex or concrete hostname to add to inventory; canonicalized server-side."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"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":"Apex or concrete hostname to add to inventory; canonicalized server-side."},"teamId":{"description":"Owning team. Defaults to the active team for sessions and the API key's team.","type":"string","minLength":1}},"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","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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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/teams/{teamId}/managed-domains":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"listTeamManagedDomains","summary":"List team managed view.fast domains","description":"Returns read-only, system-managed view.fast hostnames for spaces in a team. Custom domain inventory stays on /v1/teams/{teamId}/domains.","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","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"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))$"},"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","createdAt","updatedAt","spaceId","spaceSlug","spaceTitle"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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/domains/{domainId}":{"get":{"security":[{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getDomain","summary":"Get a domain inventory record","description":"Returns one domain from your inventory with its verification, binding, 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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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"]},"patch":{"security":[{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"updateDomain","summary":"Update domain metadata","description":"Updates metadata fields (`wildcardEnabled`). Facet modes change only via POST /dns and POST /registration.","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":{"wildcardEnabled":{"description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them.","type":"boolean"}},"additionalProperties":false}},"application/x-www-form-urlencoded":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"wildcardEnabled":{"description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them.","type":"boolean"}},"additionalProperties":false}},"multipart/form-data":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"wildcardEnabled":{"description":"Pass `true` to allow wildcard bindings under this domain record. Pass `false` to disallow them.","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","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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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"]},"delete":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"deleteDomain","summary":"Delete a domain from inventory","description":"Deletes an unbound domain and its DNS data from your inventory. Bound domains must be unbound first.","responses":{"204":{"description":"The domain was deleted."}},"parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]}],"operationId":"listSpaceDomains","summary":"List domains assigned to a space","description":"Returns a convenience read view. Assignment and primary selection stay on PATCH /v1/teams/{teamId}/domains/{domainId}.","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["code","severity","message"],"additionalProperties":false}}},"required":["status"],"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":["id","source","managed","deletable","assignable","primary","name","kind","publicName","verification","createdAt","updatedAt"],"additionalProperties":false},{"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 platform 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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space this hostname selects (`spc_...`), or null when the record is inventory only. One Space per hostname; a Space may hold many domains."},"primary":{"type":"boolean","description":"Whether this custom domain is the space's primary URL."},"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},"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":["stattic","external"],"description":"Whether Spacefast manages this registration or an external registrar holds it."},"provider":{"description":"Wrapped registrar provider key when `mode` is `stattic`, 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":["stattic","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","registrar_dns","stattic_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":"Wrapped DNS provider key when `mode` is `stattic`, for example `route53` or `wpcom`.","type":"string"},"assignedNameservers":{"description":"Managed-zone delegation set the registrar should point at (mode `stattic`).","type":"array","items":{"type":"string"}},"observedNameservers":{"description":"Nameservers currently observed in public DNS; polled in both modes.","type":"array","items":{"type":"string"}},"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":{"anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["stattic","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","stattic_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."},"source":{"type":"string","const":"custom","description":"Custom domain inventory row."},"managed":{"type":"boolean","const":false},"deletable":{"type":"boolean","const":true},"assignable":{"type":"boolean","const":true}},"required":["id","tenantId","principal","name","kind","wildcardEnabled","spaceId","primary","derivedGroup","verification","createdAt","updatedAt","source","managed","deletable","assignable"],"additionalProperties":false}]}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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"]}},"/v1/spaces/{spaceId}/domains/{domainId}/diagnostics":{"get":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:read"]}],"operationId":"getSpaceDomainDiagnostics","summary":"Get a bound domain's diagnostics","description":"Returns DNS observations, setup instructions, and SSL state for a domain bound 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":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected TXT verification value."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether observed A records look proxied."},"txtVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the verification TXT is observed."},"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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","mx","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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","mx","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"validationExpiration":{"anyOf":[{"type":"string"},{"type":"null"}]},"authzUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryDate":{"anyOf":[{"type":"string"},{"type":"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}/ssl/retry":{"post":{"security":[{"claimTokenAuth":[]},{"bearerAuth":[]},{"oauth2":["domains:write"]}],"operationId":"retrySpaceDomainSsl","summary":"Retry SSL for a bound domain","description":"Retries SSL certificate issuance for a domain bound to this space and returns updated diagnostics.","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))$"},"retries":{"type":"array","items":{"type":"object","properties":{"hostname":{"type":"string"},"queued":{"type":"boolean"},"error":{"anyOf":[{"type":"string","enum":["not_hosted_here"]},{"type":"null"}]}},"required":["hostname","queued","error"],"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Expected TXT verification value."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"pointsToProvider":{"type":"boolean","description":"Whether every provider-supported address family points at the provider."},"proxyDetected":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether observed A records look proxied."},"txtVerified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the verification TXT is observed."},"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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["a","aaaa","caa","cname","mx","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"}},"mx":{"default":[],"type":"array","items":{"type":"string"}},"txt":{"default":[],"type":"array","items":{"type":"string"}}},"required":["resolver","a","aaaa","caa","cname","mx","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"validationExpiration":{"anyOf":[{"type":"string"},{"type":"null"}]},"authzUri":{"anyOf":[{"type":"string"},{"type":"null"}]},"brokenRecord":{"anyOf":[{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastError":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryDate":{"anyOf":[{"type":"string"},{"type":"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}}},"required":["requestedAt","retries","hostnameDiagnostics"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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 and get a live URL","description":"Publishes already-built files directly, or turns a zip/tar project archive into a durable Spacefast CI build that runs the Spacefast CLI. A zip that is already a website publishes immediately, exactly like a file manifest; an archive that needs a build, such as Next.js, goes to CI and its receipt returns `next.action=poll`, staying available at that status link until the Build settles. Direct publishes wait for the finalize to complete by default; pass `async=1` to return immediately with an operation link to poll. The two user-facing links are Open (reusable access) and, for anonymous Spaces, Claim (one-time ownership transfer). 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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","publicName","liveUrl"],"additionalProperties":false},"build":{"type":"object","properties":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL, or null while the version is still being finalized."},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"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 with channel null, by request. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The version currently serving live traffic, or null when the space has none."}},"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"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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 /__/<key> 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#<key> 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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL, or null while the version is still being finalized."},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"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 with channel null, by request. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The version currently serving live traffic, or null when the space has none."}},"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"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Files ignored by plan policy."}},"required":["upload","reused","ignored"],"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.resume` 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}},"links":{"type":"object","properties":{"resume":{"type":"string"},"finalize":{"type":"string"}},"required":["resume","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}},"ignored":{"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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. Includes the `noop_publish` info diagnostic when nothing changed (the only noop signal), manifest warnings such as `path_case_collision`, and serving-shape notes such as `single_html_index` or `files_mode_inferred`.","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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"resume":{"description":"Resume endpoint; present while bytes still need uploading.","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.view.fast","liveUrl":"https://marketing-site.view.fast/"},"version":{"id":"ver_2b9e7d4c1a6f8b3e0d5c9a2f7e4b1d8c","ref":"v1","number":1,"status":"ready","immutableUrl":"https://v1--marketing-site.view.fast/","manifestHash":"sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"},"access":{"url":"https://marketing-site.view.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":["Spaces"],"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":{"anyOf":[{"type":"string"},{"type":"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"],"additionalProperties":false},"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"],"additionalProperties":false},"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."},"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}}},"required":["kind"],"additionalProperties":false},"rationale":{"description":"Explains why this publish is necessary. Agent mutations require this value. The server stores it in the publish audit event.","type":"string","minLength":1,"maxLength":1024},"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, or pass null to create a ready version without promotion.","anyOf":[{"type":"string","enum":["live"]},{"type":"null"}]},"space":{"type":"object","properties":{"slug":{"type":"string","minLength":2,"maxLength":55},"title":{"type":"string","minLength":1,"maxLength":255},"dataLocation":{"type":"string","minLength":1}},"additionalProperties":false},"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"],"additionalProperties":false}]},"cleanUrls":{"description":"Serve flat `<name>.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"],"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},"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"}},"additionalProperties":false,"description":"Placement controls for this space."},"markdownNegotiation":{"description":"Accepted serving flag; runtime enforcement ships separately.","type":"boolean"},"dataSources":{"description":"Named public WordPress sources exposed to repository builds; at most 32 entries.","maxProperties":32,"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."}},"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}},"required":["files"],"additionalProperties":false,"~standard":{"vendor":"zod","version":1,"jsonSchema":{}}},"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":"<!doctype html>\n<title>Launch</title>\n<h1>Hello from Spacefast</h1>\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/publish/builds/{buildId}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"getPublishBuild","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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","title","publicName","liveUrl"],"additionalProperties":false},"build":{"type":"object","properties":{"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryFullName":{"anyOf":[{"type":"string"},{"type":"null"}]},"repositoryUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"branchAliasUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"commitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequestNumber":{"anyOf":[{"type":"number"},{"type":"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; 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.","anyOf":[{"type":"string"},{"type":"null"}]},"producedVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Version (`ver_`) minted by a successful build; null otherwise."},"reusedVersionId":{"default":null,"description":"Existing version reused by a successful no-change build; null otherwise.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permanent version URL, or null while the version is still being finalized."},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"manifestHash":{"anyOf":[{"type":"string"},{"type":"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 with channel null, by request. superseded: ready, but a newer publish holds the live pointer. pending: not settled yet."},"currentLiveVersionId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The version currently serving live traffic, or null when the space has none."}},"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"],"description":"Who owns this space's git history. `spacefast`: push `remoteUrl` to publish. `github`: the space deploys from `repository` and direct pushes are refused."},"remoteUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credential-free git remote to push to, or null when `managedBy` is `github`. Authenticate as HTTP Basic user `t` with a space key or API key as the password."},"repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`owner/name` of the GitHub repository this space deploys from, else null."},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch that publishes to the live channel when pushed."}},"required":["managedBy","remoteUrl","repository","defaultBranch"],"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 /__/<key> 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#<key> 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.","anyOf":[{"type":"string"},{"type":"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.","anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"description":"Whether retrying the same operation can resolve this diagnostic without the caller changing anything.","anyOf":[{"type":"boolean"},{"type":"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":["Spaces"]}},"/v1/repository-connections/installations":{"get":{"operationId":"listGithubInstallations","summary":"List GitHub App installations","description":"Returns GitHub App installations connected to the selected space's team.","parameters":[{"name":"spaceId","in":"query","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":{"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/repository-connections/installations/{installationId}/repositories":{"get":{"operationId":"listGithubInstallationRepositories","summary":"List installation repositories","description":"Returns repositories selected for a GitHub App installation connected to the selected space's team.","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"spaceId","in":"query","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"},"name":{"type":"string"},"fullName":{"type":"string"},"defaultBranch":{"type":"string"},"cloneUrl":{"type":"string"},"private":{"type":"boolean"}},"required":["id","name","fullName","defaultBranch","cloneUrl","private"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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}/repository-connection":{"post":{"operationId":"createSpaceRepositoryConnection","summary":"Create a repository connection","description":"Creates a repository connection for the selected connection type. If one already exists for that type, this operation replaces it.","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},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"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"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"],"additionalProperties":false}},"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},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"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"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"],"additionalProperties":false}},"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},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"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"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"required":["repositoryFullName"],"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]},"get":{"operationId":"getSpaceRepositoryConnection","summary":"Get a repository connection","description":"Returns the repository connection for a space and connection type.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]},"patch":{"operationId":"updateSpaceRepositoryConnection","summary":"Update a repository connection","description":"Updates build defaults, branch behavior, and repository URLs for a repository 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"]},"productionBranch":{"type":"string","minLength":1},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"additionalProperties":false}},"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},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"additionalProperties":false}},"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},"cloneUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"upstreamUrl":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"credential":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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}},"additionalProperties":false,"description":"Sparse per-request build setting overrides applied over saved settings."}},"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":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]},"delete":{"operationId":"deleteSpaceRepositoryConnection","summary":"Delete a repository connection","description":"Deletes one repository connection and stops future repository-triggered builds for it.","responses":{"204":{"description":"The repository connection was deleted."}},"parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}}],"tags":["Spaces"]}},"/v1/spaces/{spaceId}/repository-webhook-deliveries":{"get":{"operationId":"listSpaceRepositoryWebhookDeliveries","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":true,"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":{"type":"string","enum":["connected","hosted"]}},{"name":"status","in":"query","required":false,"schema":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"matchedConnectionIds":{"default":[],"type":"array","items":{"type":"string"}},"repositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"eventName":{"type":"string"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["received","processing","processed","ignored","failed"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"queuedBuildIds":{"type":"array","items":{"type":"string"}},"retiredVersionIds":{"default":[],"type":"array","items":{"type":"string"}},"rawBodySha256":{"anyOf":[{"type":"string"},{"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","receiver","deliveryId","repositoryConnectionId","matchedConnectionIds","repositoryId","eventName","ref","commit","syncRunId","status","statusMessage","queuedBuildIds","retiredVersionIds","rawBodySha256","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque cursor for the next page; null when there are no more results."},"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/repository-webhook-deliveries/{deliveryId}":{"get":{"operationId":"getRepositoryWebhookDelivery","summary":"Get a repository webhook delivery","description":"Returns one repository webhook delivery status without exposing the raw payload.","parameters":[{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"matchedConnectionIds":{"default":[],"type":"array","items":{"type":"string"}},"repositoryId":{"anyOf":[{"type":"string"},{"type":"null"}]},"eventName":{"type":"string"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["received","processing","processed","ignored","failed"]},"statusMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"queuedBuildIds":{"type":"array","items":{"type":"string"}},"retiredVersionIds":{"default":[],"type":"array","items":{"type":"string"}},"rawBodySha256":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/analyze":{"post":{"operationId":"analyzeSpaceRepositoryConnection","summary":"Analyze a repository connection","description":"Detects framework settings and unsupported platform configuration for a repository connection.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","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"}]}},"additionalProperties":false}},"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"}]}},"additionalProperties":false}},"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"}]}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/push-remote":{"post":{"operationId":"createSpaceRepositoryPushRemote","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 repository 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":86400},"readOnlyRefs":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false}},"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}}},"additionalProperties":false}},"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}}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/import-remote":{"post":{"operationId":"createSpaceRepositoryImportRemote","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}}},"additionalProperties":false}},"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}}},"additionalProperties":false}},"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}}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/files":{"get":{"operationId":"listSpaceRepositoryFiles","summary":"List repository files","description":"Returns files from a synced repository connection without exposing implementation details.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"recursive","in":"query","required":true,"schema":{"default":false,"type":"boolean"}},{"name":"limit","in":"query","required":true,"schema":{"default":250,"type":"integer","exclusiveMinimum":0,"maximum":1000}},{"name":"metadata","in":"query","required":true,"schema":{"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"lastCommitSha":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/file":{"get":{"operationId":"getSpaceRepositoryFile","summary":"Get a repository file","description":"Returns one bounded text file or a metadata-only file head from a synced repository connection without exposing implementation details.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"head","in":"query","required":true,"schema":{"default":false,"type":"boolean"}},{"name":"maxBytes","in":"query","required":true,"schema":{"default":65536,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"blobSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastCommitSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"etag":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastModified":{"anyOf":[{"type":"string"},{"type":"null"}]},"contentType":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/search":{"get":{"operationId":"searchSpaceRepositoryFiles","summary":"Search repository files","description":"Searches text in a synced repository connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"pattern","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"caseSensitive","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"includeGlob","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"excludeGlob","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"extension","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"contextBefore","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":20}},{"name":"contextAfter","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":20}},{"name":"maxLines","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":1000}},{"name":"maxMatchesPerFile","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/diff":{"get":{"operationId":"getSpaceRepositoryDiff","summary":"Get a repository branch diff","description":"Returns changed files and summary stats for a repository branch without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"branch","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"base","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"ephemeral","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ephemeralBase","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"path","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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}},"required":["path","oldPath","state","additions","deletions","changes"],"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/archive":{"get":{"operationId":"downloadSpaceRepositoryArchive","summary":"Download a repository archive","description":"Downloads a repository archive from a synced repository 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":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"ref","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"includeGlob","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"excludeGlob","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"maxBlobSize","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":104857600}},{"name":"archivePrefix","in":"query","required":false,"schema":{"type":"string","minLength":1}}],"tags":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/tags":{"get":{"operationId":"listSpaceRepositoryTags","summary":"List repository tags","description":"Returns release tags from a synced repository connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"post":{"operationId":"createSpaceRepositoryTag","summary":"Create a repository tag","description":"Creates a release tag in a ready repository connection without exposing backing-provider details.","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/commits":{"get":{"operationId":"listSpaceRepositoryCommits","summary":"List repository commits","description":"Returns commit history from a synced repository connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"branch","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","exclusiveMinimum":0,"maximum":100}},{"name":"ephemeral","in":"query","required":false,"schema":{"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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"},"message":{"type":"string"},"authorName":{"type":"string"},"authorEmail":{"type":"string"},"committerName":{"type":"string"},"committerEmail":{"type":"string"},"date":{"type":"string"}},"required":["sha","message","authorName","authorEmail","committerName","committerEmail","date"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"post":{"operationId":"createSpaceRepositoryCommit","summary":"Create a repository commit","description":"Creates a commit from explicit file operations without requiring a local Git client or signed remote.","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},"contents":{"type":"string"},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1}},"required":["action","path"],"additionalProperties":false}]}},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","operations","author"],"additionalProperties":false}},"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},"contents":{"type":"string"},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1}},"required":["action","path"],"additionalProperties":false}]}},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","operations","author"],"additionalProperties":false}},"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},"contents":{"type":"string"},"mode":{"type":"string","enum":["100644","100755","120000","160000"]},"encoding":{"type":"string","enum":["utf8","base64","hex"]}},"required":["action","path","contents"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"delete"},"path":{"type":"string","minLength":1}},"required":["action","path"],"additionalProperties":false}]}},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","operations","author"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/commits/diff":{"post":{"operationId":"createSpaceRepositoryCommitFromDiff","summary":"Create a repository commit from a diff","description":"Creates a commit from a unified diff without requiring a local Git client or signed remote.","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},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","diff","author"],"additionalProperties":false}},"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},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","diff","author"],"additionalProperties":false}},"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},"expectedHeadSha":{"type":"string","minLength":1},"baseBranch":{"type":"string","minLength":1},"ephemeral":{"type":"boolean"},"ephemeralBase":{"type":"boolean"},"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"],"additionalProperties":false},"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"],"additionalProperties":false}},"required":["connectionType","targetBranch","commitMessage","diff","author"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/commit":{"get":{"operationId":"getSpaceRepositoryCommit","summary":"Get a repository commit","description":"Returns commit metadata from a synced repository connection without requiring a signed Git remote.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","type":"string","enum":["connected","hosted"]}},{"name":"sha","in":"query","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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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"},"message":{"type":"string"},"authorName":{"type":"string"},"authorEmail":{"type":"string"},"committerName":{"type":"string"},"committerEmail":{"type":"string"},"date":{"type":"string"}},"required":["sha","message","authorName","authorEmail","committerName","committerEmail","date"],"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/sync":{"post":{"operationId":"syncSpaceRepositoryConnection","summary":"Sync a repository connection","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}}},"additionalProperties":false}},"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}}},"additionalProperties":false}},"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}}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/ephemeral-branch":{"post":{"operationId":"createSpaceRepositoryEphemeralBranch","summary":"Create an ephemeral repository branch","description":"Creates 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":true,"schema":{"default":"connected","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseBranch":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]},"delete":{"operationId":"deleteSpaceRepositoryEphemeralBranch","summary":"Delete an ephemeral repository branch","description":"Deletes a short-lived repository branch when a preview or experiment is done.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"null"}]},"baseBranch":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/ephemeral-remote":{"post":{"operationId":"createSpaceRepositoryEphemeralRemote","security":[{"bearerAuth":[]},{"oauth2":["spaces:read"]}],"summary":"Get an ephemeral repository remote","description":"Returns a signed Git remote for a short-lived repository branch without exposing implementation details.","parameters":[{"name":"spaceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"connectionType","in":"query","required":true,"schema":{"default":"connected","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}}},"additionalProperties":false}},"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}}},"additionalProperties":false}},"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}}},"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/spaces/{spaceId}/repository-connection/merge":{"post":{"operationId":"mergeSpaceRepositoryBranches","summary":"Merge repository branches","description":"Merges repository branches for preview promotion and agent-edit workflows without exposing backing-provider details.","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"],"additionalProperties":false},"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"],"additionalProperties":false},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"],"additionalProperties":false}},"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"],"additionalProperties":false},"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"],"additionalProperties":false},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"],"additionalProperties":false}},"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"],"additionalProperties":false},"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"],"additionalProperties":false},"allowUnrelatedHistories":{"type":"boolean"},"squash":{"type":"boolean"}},"required":["connectionType","sourceBranch","targetBranch"],"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":{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"installationId":{"default":null,"description":"Repository app installation id, when configured.","anyOf":[{"type":"string"},{"type":"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"},"repositoryName":{"type":"string"},"repositoryFullName":{"type":"string"},"defaultBranch":{"type":"string"},"productionBranch":{"type":"string"},"credentialConfigured":{"type":"boolean"},"autoDeployProduction":{"type":"boolean"},"autoDeployPreviews":{"type":"boolean"},"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,"anyOf":[{"type":"string"},{"type":"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncRunId":{"anyOf":[{"type":"string"},{"type":"null"}]},"connectedUserId":{"anyOf":[{"type":"string"},{"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","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":{"anyOf":[{"type":"string"},{"type":"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":["Spaces"]}},"/v1/auth/capabilities":{"get":{"operationId":"getAuthCapabilities","summary":"List sign-in capabilities","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"}},"required":["wpcom","google","github"],"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":{"anyOf":[{"type":"string"},{"type":"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/capabilities":{"get":{"operationId":"discoverAgentCapabilities","summary":"Discover this interactive agent's capabilities","description":"Returns the effective scopes and route-declared acceptable scope sets for user-owned interactive grants. This advisory map never replaces route authorization.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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"},"degraded":{"type":"boolean"},"grantId":{"type":"string"},"authorizationLevel":{"type":"string","const":"user"},"grantedScopes":{"type":"array","items":{"type":"string"}},"reason":{"type":"string"},"capabilities":{"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","capabilities"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"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/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":"Requesting client identifier shown on the verification page.","type":"string","minLength":1,"maxLength":255},"scope":{"description":"Requested access preset name. The approver chooses the final preset; this only seeds the verification page default.","type":"string","minLength":1,"maxLength":4096},"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":"Requesting client identifier shown on the verification page.","type":"string","minLength":1,"maxLength":255},"scope":{"description":"Requested access preset name. The approver chooses the final preset; this only seeds the verification page default.","type":"string","minLength":1,"maxLength":4096},"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":"Requesting client identifier shown on the verification page.","type":"string","minLength":1,"maxLength":255},"scope":{"description":"Requested access preset name. The approver chooses the final preset; this only seeds the verification page default.","type":"string","minLength":1,"maxLength":4096},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Requesting client identifier recorded at device start."},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OAuth scope string the device requested at start, if any."},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Request origin (client IP) recorded when the device flow started."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display title of the anonymous space, if available."},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current live URL of the anonymous space, if any."}},"required":["spaceId","title","liveUrl"],"additionalProperties":false},{"type":"null"}],"description":"Explicit claim handoff attached to this device authorization, if any."}},"required":["status","clientId","scope","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":{"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","spaces:read","spaces:write","spaces:rename","publish:write","domains:read","domains:write","spaces:publish","builds:trigger","mcp:tools"]},"description":"OAuth scopes the approver granted, from the same checklist consent uses. The server compiles them into a policy; the compiled policy must be a subset of the approver's team-role policy."},"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","spaces:read","spaces:write","spaces:rename","publish:write","domains:read","domains:write","spaces:publish","builds:trigger","mcp:tools"]},"description":"OAuth scopes the approver granted, from the same checklist consent uses. The server compiles them into a policy; the compiled policy must be a subset of the approver's team-role policy."},"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","spaces:read","spaces:write","spaces:rename","publish:write","domains:read","domains:write","spaces:publish","builds:trigger","mcp:tools"]},"description":"OAuth scopes the approver granted, from the same checklist consent uses. The server compiles them into a policy; the compiled policy must be a subset of the approver's team-role policy."},"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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Space claimed by the server-side claim handoff, if one was attached."}},"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":{"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"],"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 denied (dashes ignored)."}},"required":["userCode"],"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 denied (dashes ignored)."}},"required":["userCode"],"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":"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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","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":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Human-readable key name."},"tenantId":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tenant the key belongs to."},"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":{"type":"string","description":"User who created the key."},"preset":{"anyOf":[{"type":"string","enum":["ci_deploy","space_publisher","space_admin","site_admin","domain_manager","team_admin","billing_viewer"],"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":["sites:read","sites:create","sites:write","sites:delete","sites:policy.write","spaces:read","spaces:create","spaces:write","spaces:rename","spaces:delete","spaces:publish","spaces:transfer","spaces:export","spaces:import","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","teams:read","teams:create","teams:write","teams:members.write","billing:read","billing:write","tokens:read","tokens:create","tokens:revoke","mcp:tools","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}, …/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","subject","ownerPrincipal","createdByUserId","preset","teamScope","policy","metadata","secretPreview","notBefore","expiresAt","ipAllowlist","revokedAt","enabled","createdAt","updatedAt","lastRequestAt"],"additionalProperties":false},"claimedSpaceId":{"description":"Space claimed during approval, when the device flow was started by `sf spaces claim`.","anyOf":[{"type":"string"},{"type":"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":{"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":{"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"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":{"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":{"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"],"additionalProperties":false}},"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"],"additionalProperties":false}},"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"],"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":{"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":{"operationId":"requestApproval","summary":"Request a user decision for an agent action","description":"Creates a server-bound confirmation or temporary scope-elevation request. The required rationale, resource revision, requesting credential, and user-owned grant are immutable.","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","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"]},"id":{"type":"string","minLength":1},"revision":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"required":["kind","id","revision"],"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","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"]},"id":{"type":"string","minLength":1},"revision":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"required":["kind","id","revision"],"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","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"]},"id":{"type":"string","minLength":1},"revision":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"required":["kind","id","revision"],"additionalProperties":false},"quote":{"type":"null"}},"required":["kind","operation","rationale","resource"],"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":{"decisionId":{"type":"string"}},"required":["decisionId"],"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":["Spaces"]}},"/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":["Spaces"]}},"/v1/docs/{slug}":{"get":{"operationId":"getDoc","summary":"Read one documentation page","description":"Returns one documentation page by slug, for example `publishing` or `api/spaces`, including its printable body. Slug lookup ignores tier so any documented page is reachable.","responses":{"200":{"description":"Response for status 200","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"$schema":{"type":"string","format":"uri","description":"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 human-readable docs URL."},"links":{"type":"object","properties":{"doc":{"type":"string","format":"uri","description":"Canonical human-readable docs URL."},"self":{"type":"string","description":"API-relative link to this entry's JSON (`/v1/docs/{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"}}]}}}}