{"openapi":"3.0.3","info":{"title":"Markdown Logic Platform API","version":"1.1.0","description":"Authenticated platform API: teams, projects, documents, folders, publications\n(snapshots and releases), renders, shares, credentials and billing.\n\n**Authentication is OAuth 2.1 only.** Send an access token issued by\n`https://auth.markdownlogic.com` as `Authorization: Bearer <jwt>`. Session\ntokens and `mdl_` access keys are no longer issued and are rejected. Earlier\nversions of this document described them after they had already stopped working.\n\nEvery operation records the scope its gate requires in `x-required-scope`.\nA client credential may additionally be BOUND to one team\n(`oauth_clients.team_id`), in which case every request naming another team is\nrefused with 403 regardless of what its owner can reach.\n\nThe public share surface (`/s/**`, `/share/project/**`) is unauthenticated and\nis not described here."},"servers":[{"url":"https://api.dev.markdownlogic.com"}],"security":[{"bearerAuth":[]}],"components":{"schemas":{"SearchResults":{"type":"object","additionalProperties":false,"properties":{"results":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"document":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The document id."},"kind":{"type":"string","enum":["project_doc","repo_doc","endpoint_doc"],"description":"What kind of document this is."},"scope":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["project","repo"],"description":"Whether the document lives in a project or a connected repository."},"id":{"type":"string","description":"The project or repository id."},"name":{"type":"string","description":"The project or repository name, for display."}},"required":["type","id","name"]},"title":{"type":"string"},"path":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","description":"When the document itself was last saved (not when it was indexed)."}},"required":["id","kind","scope","title","path","updatedAt"]},"match":{"type":"string","enum":["keyword","semantic","both"],"description":"Which arm of the query found this document: exact/BM25 text match, semantic/vector similarity, or a chunk of each."},"passages":{"type":"array","items":{"type":"object","additionalProperties":false,"description":"One excerpt from the document, centred on a query match. A document may carry zero passages when its indexed text may be stale (see `flags`).","properties":{"headingPath":{"type":"array","items":{"type":"string"},"description":"The section headings this passage falls under, outermost first."},"text":{"type":"string","description":"The excerpt itself, at most 300 characters."},"highlights":{"type":"array","description":"[start, end) character offsets into `text` where a query term was found, merged where they overlap. Each is a position to mark, never a ranking signal.","items":{"type":"array","items":{"type":"number"}}}},"required":["headingPath","text","highlights"]}},"flags":{"type":"array","items":{"type":"string"},"description":"Caveats about this result: `partially_indexed` (only part of the document was indexed), `changed_since_indexed` (edited after indexing, so its passages are withheld rather than shown as stale text), `endpoint_title_only` (an endpoint document, indexed by title only)."}},"required":["document","match","passages","flags"]}},"index":{"type":"object","additionalProperties":false,"description":"The team search index status. Project-scoped connections receive null to omit team-wide indexing telemetry.","properties":{"status":{"type":"string","enum":["building","up_to_date","updating","delayed"],"description":"building: the first index has not finished. up_to_date: no pending or terminally failed work. updating: recent edits are being indexed. delayed: the backlog has been unworked for over an hour, the team or platform is budget-paused, or there is failed work with nothing pending."},"pending":{"type":"integer","description":"Visible indexing jobs still pending, including retries."},"incomplete":{"type":"boolean","description":"Present and true when visible indexing jobs have exhausted their retries."},"oldestPendingAt":{"type":"string","nullable":true,"format":"date-time","description":"When the oldest pending document was queued, or null when nothing is pending."},"backfill":{"type":"object","nullable":true,"additionalProperties":false,"description":"Progress of the initial build, only while `status` is `building`; null once the team has an up-to-date index.","properties":{"done":{"type":"integer"},"total":{"type":"integer"}},"required":["done","total"]}},"required":["status","pending","oldestPendingAt","backfill"],"nullable":true}},"required":["results","index"]},"SearchSuggestions":{"type":"object","additionalProperties":false,"properties":{"suggestions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"The document id."},"kind":{"type":"string","enum":["project_doc","repo_doc","endpoint_doc"],"description":"What kind of document this is."},"title":{"type":"string"},"path":{"type":"string"},"scope":{"type":"object","additionalProperties":false,"properties":{"type":{"type":"string","enum":["project","repo"],"description":"Whether the document lives in a project or a connected repository."},"id":{"type":"string","description":"The project or repository id."},"name":{"type":"string","description":"The project or repository name, for display."}},"required":["type","id","name"]},"updatedAt":{"type":"string","format":"date-time"},"recentlyEdited":{"type":"boolean","description":"True when the document has been edited since the index last caught up with it (\"Recently edited\"). It is a hint that it is fresh, not that it is stale."}},"required":["id","kind","title","path","scope","updatedAt","recentlyEdited"]}}},"required":["suggestions"]},"SearchSettings":{"type":"object","additionalProperties":false,"properties":{"search":{"type":"object","additionalProperties":false,"properties":{"state":{"type":"string","enum":["unavailable","restricted","disabled","active"],"description":"GET only. The resolved gate state: unavailable (platform mode is off or this team is not allowlisted), restricted (the plan lacks the search capability), disabled (team search is off or protected content indexing is paused), active."},"enabled":{"type":"boolean","description":"Whether the team has selected search on. When protectionPaused is true, the selection is saved while content search remains unavailable."},"protectionPaused":{"type":"boolean","description":"Present for administrators when advanced data protection is withholding content indexing. Saving enabled does not change the separate indexing consent."},"deleteAfter":{"type":"string","nullable":true,"format":"date-time","description":"When the index is due to be deleted after being turned off, or null when nothing is scheduled."},"reenableAfter":{"type":"string","nullable":true,"format":"date-time","description":"When search may be turned back on, while a prior delete-now’s 24-hour lock is in effect; null otherwise."},"rebuild":{"type":"boolean","description":"PUT and delete-index only: whether THIS call caused a rebuild of the index (spends the team’s monthly rebuild allowance)."}},"required":["enabled","deleteAfter","reenableAfter"]},"index":{"type":"object","additionalProperties":false,"description":"GET only: the index status and counts visible to the authenticated caller.","properties":{"status":{"type":"string","enum":["building","up_to_date","updating","delayed"],"description":"building: the first index has not finished. up_to_date: no pending or terminally failed work. updating: recent edits are being indexed. delayed: the backlog has been unworked for over an hour, the team or platform is budget-paused, or there is failed work with nothing pending."},"pending":{"type":"integer","description":"Visible indexing jobs still pending, including retries."},"incomplete":{"type":"boolean","description":"Present and true when visible indexing jobs have exhausted their retries."},"oldestPendingAt":{"type":"string","nullable":true,"format":"date-time","description":"When the oldest pending document was queued, or null when nothing is pending."},"backfill":{"type":"object","nullable":true,"additionalProperties":false,"description":"Progress of the initial build, only while `status` is `building`; null once the team has an up-to-date index.","properties":{"done":{"type":"integer"},"total":{"type":"integer"}},"required":["done","total"]}},"required":["status","pending","oldestPendingAt","backfill"]},"sensitivity":{"type":"object","additionalProperties":false,"description":"GET only, for owners and admins on a team that blocks sensitive sharing: how many documents are withheld from search because no sensitivity verdict covers their current content. Counts only. The two findings ABOUT content (`sensitiveRepoDocuments`, `indeterminateRepoDocuments`) stay in the sysadmin diagnostics and are deliberately not published here.","properties":{"unknownRepoDocuments":{"type":"integer","description":"Repository documents awaiting a verdict. The hourly catch-up drains this one on its own."},"unknownProjectDocuments":{"type":"integer","description":"Project documents with no verdict covering their current content. A verdict is written when a document is read or shared, so nothing drains this in the background."},"unknownEndpointDocuments":{"type":"integer","description":"Endpoint documents, withheld and resolved on the same terms as project documents."}},"required":["unknownRepoDocuments","unknownProjectDocuments","unknownEndpointDocuments"]},"sensitivityCountsUnavailable":{"type":"boolean","description":"GET only, and only for a caller that asked for the counts: the team blocks sensitive sharing, so documents are being withheld from search, but the counts cannot be read on this database (it is behind migration 0064). `sensitivity` is absent in that case rather than zero, because zero would claim every document has been checked. Present only when true."}},"required":["search"]},"SearchDiagnostics":{"type":"object","additionalProperties":false,"description":"A team's search diagnostics (sysadmin). Ids, counts and reason codes only: never a document's title, path or content, and never a vendor error's raw text outside `failed[].lastError`.","properties":{"pending":{"type":"integer","description":"Documents not yet reflected in the index (pending + backfill)."},"oldestPendingAt":{"type":"string","nullable":true,"format":"date-time"},"failed":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"scopeKind":{"type":"string"},"scopeId":{"type":"string"},"attempts":{"type":"integer"},"lastError":{"type":"string","nullable":true,"description":"Capped at 200 characters. May hold extraction or vendor detail; it is the one diagnostics field that can, never the document itself."},"nextAttemptAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["scopeKind","scopeId","attempts","lastError","nextAttemptAt"]},"description":"A page of at most 50 failed rows, oldest first. This is a SAMPLE, not the full list; see `failedTotal` for the real count."},"failedTotal":{"type":"integer","description":"The true count behind `failed`, uncapped by the 50-row page."},"notIndexed":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"docKey":{"type":"string","description":"Opaque id (kind + document id), never a title or path."},"reason":{"type":"string","description":"A reason CODE, never vendor or extraction text."},"indexedAt":{"type":"string","format":"date-time"}},"required":["docKey","reason","indexedAt"]},"description":"A page of at most 50 not-indexed rows. This is a SAMPLE, not the full list; see `notIndexedTotal` for the real count."},"notIndexedTotal":{"type":"integer","description":"The true count behind `notIndexed`, uncapped by the 50-row page."},"spend":{"type":"object","additionalProperties":false,"description":"This TEAM's own spend for the day, indexing and queries together. For the platform-wide figure see the top-level `platform.liveUsd`, which is a different number and not this team's alone.","properties":{"todayUsd":{"type":"number"},"reservedUsd":{"type":"number"},"embeddedTokens":{"type":"integer"},"pausedUntil":{"type":"string","nullable":true,"format":"date-time"}},"required":["todayUsd","reservedUsd","embeddedTokens","pausedUntil"]},"sensitivity":{"type":"object","additionalProperties":false,"description":"The documents this team’s sensitive-sharing policy withholds from search, and the catch-up that resolves them.","properties":{"sensitiveRepoDocuments":{"type":"integer","description":"Documents whose stored verdict is a real sensitive kind."},"indeterminateRepoDocuments":{"type":"integer","description":"Documents examined and found undeterminable; treated as unknown by search, not as a sensitive finding."},"unknownRepoDocuments":{"type":"integer","description":"Documents whose stored verdict does not (or does not yet) cover their current content. This is the countdown to zero after a detector revision bump."},"unknownProjectDocuments":{"type":"integer","description":"Project documents with no sensitivity verdict yet. A verdict is written when a document is read or shared, so a document nobody has opened since the policy was turned on has none, and search withholds it. This count is why a team with the policy on can see fewer results than it expects."},"unknownEndpointDocuments":{"type":"integer","description":"Endpoint documents with no sensitivity verdict yet, withheld for the same reason as unknownProjectDocuments."}},"required":["sensitiveRepoDocuments","indeterminateRepoDocuments","unknownRepoDocuments","unknownProjectDocuments","unknownEndpointDocuments"]},"rebuildsUsed":{"type":"integer","description":"This team's index rebuilds used this month, against its plan allowance."},"indexedDocuments":{"type":"integer","description":"Documents currently in the index."},"billedBytes":{"type":"integer","description":"Bytes billed for this team’s indexed content."},"platform":{"type":"object","additionalProperties":false,"properties":{"liveUsd":{"type":"number","description":"The WHOLE PLATFORM's live spend for the day: every team's queries AND every team's live re-indexing, not this team's alone. Read `spend.todayUsd` above for this team's own figure; this number is usually much larger and is not this team's bill."}},"required":["liveUsd"]},"namespaceState":{"type":"string","enum":["none","building","ready","deleting"],"description":"The vendor namespace's own state, distinct from `index.status` in the query response."},"deleteAfter":{"type":"string","nullable":true,"format":"date-time"},"deleteTrigger":{"type":"string","nullable":true,"enum":["erasure","delete_now","disabled","plan_change"],"description":"What scheduled the pending delete (an unrecognised stored value reads as null, never as a guess)."}},"required":["pending","oldestPendingAt","failed","failedTotal","notIndexed","notIndexedTotal","spend","sensitivity","rebuildsUsed","indexedDocuments","billedBytes","platform","namespaceState","deleteAfter","deleteTrigger"]},"DocumentVersionDiffResult":{"type":"object","anyOf":[{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"fromVersionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"toVersionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"status":{"type":"string","enum":["available"]},"revision":{"type":"string","enum":["text-line-diff@1"]},"oldLines":{"type":"integer","minimum":0},"newLines":{"type":"integer","minimum":0},"addedLines":{"type":"integer","minimum":0},"removedLines":{"type":"integer","minimum":0},"hunks":{"type":"array","maxItems":512,"items":{"type":"object","properties":{"oldStart":{"type":"integer","minimum":1},"newStart":{"type":"integer","minimum":1},"oldCount":{"type":"integer","minimum":0},"newCount":{"type":"integer","minimum":0},"lines":{"type":"array","maxItems":40000,"items":{"type":"object","properties":{"kind":{"type":"string","enum":["context","remove","add"]},"text":{"type":"string","maxLength":65536}},"required":["kind","text"],"additionalProperties":false}}},"required":["oldStart","newStart","oldCount","newCount","lines"],"additionalProperties":false}},"sources":{"type":"object","properties":{"from":{"type":"object","properties":{"versionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"sourceFormat":{"type":"string","minLength":1,"maxLength":64},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":0,"maximum":1048576}},"required":["versionId","sourceFormat","sha256","byteLength"],"additionalProperties":false},"to":{"type":"object","properties":{"versionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"sourceFormat":{"type":"string","minLength":1,"maxLength":64},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"byteLength":{"type":"integer","minimum":0,"maximum":1048576}},"required":["versionId","sourceFormat","sha256","byteLength"],"additionalProperties":false}},"required":["from","to"],"additionalProperties":false}},"required":["documentId","fromVersionId","toVersionId","status","revision","oldLines","newLines","addedLines","removedLines","hunks","sources"],"additionalProperties":false},{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"maxLength":120,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"fromVersionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"toVersionId":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S(?:[\\s\\S]*\\S)?$"},"status":{"type":"string","enum":["unavailable"]},"revision":{"type":"string","enum":["text-line-diff@1"]},"reason":{"type":"string","enum":["input_too_large","unsupported_encoding","line_limit","work_limit","output_limit","unsupported_format","format_changed"]},"limits":{"type":"object","properties":{"inputBytes":{"type":"integer","enum":[1048576]},"lines":{"type":"integer","enum":[20000]},"editDistance":{"type":"integer","enum":[512]},"workUnits":{"type":"integer","enum":[8000000]},"contextLines":{"type":"integer","enum":[3]},"outputBytes":{"type":"integer","enum":[65536]}},"required":["inputBytes","lines","editDistance","workUnits","contextLines","outputBytes"],"additionalProperties":false}},"required":["documentId","fromVersionId","toVersionId","status","revision","reason","limits"],"additionalProperties":false}]},"DocumentTailResult":{"type":"object","properties":{"content":{"type":"string","maxLength":65536},"receipt":{"type":"object","properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"sourceFormat":{"type":"string"},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"versionId":{"type":"string","nullable":true},"contentHash":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"lineCount":{"type":"integer","minimum":0},"startByte":{"type":"integer","minimum":0},"endByte":{"type":"integer","minimum":0},"returnedBytes":{"type":"integer","minimum":0},"returnedLines":{"type":"integer","minimum":0},"asOf":{"type":"string","format":"date-time"}},"required":["projectId","documentId","sourceFormat","revision","versionId","contentHash","sizeBytes","lineCount","startByte","endByte","returnedBytes","returnedLines","asOf"],"additionalProperties":false},"nextCursor":{"type":"string","nullable":true},"cursorExpiresAt":{"type":"string","format":"date-time","nullable":true},"hasMore":{"type":"boolean"},"limitedBy":{"type":"string","enum":["lines","bytes","line-too-large",null],"nullable":true}},"required":["content","receipt","nextCursor","cursorExpiresAt","hasMore","limitedBy"],"additionalProperties":false},"DocumentAppendEpoch":{"type":"object","properties":{"documentId":{"type":"string"},"idempotencyEpoch":{"type":"string"},"admissionClosesAt":{"type":"integer","minimum":0},"recordRetainedUntil":{"type":"integer","minimum":0}},"required":["documentId","idempotencyEpoch","admissionClosesAt","recordRetainedUntil"],"additionalProperties":false},"DocumentAppendReceipt":{"type":"object","properties":{"operationId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"},"outcome":{"type":"string","enum":["appended","unchanged"]},"beforeRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"versionId":{"type":"string","nullable":true},"contentHash":{"type":"string"},"payloadBytes":{"type":"integer","minimum":0},"payloadLines":{"type":"integer","minimum":0},"appendedBytes":{"type":"integer","minimum":0},"appendedLines":{"type":"integer","minimum":0},"sizeBytes":{"type":"integer","minimum":0},"lineCount":{"type":"integer","minimum":0},"committedAt":{"type":"string","format":"date-time"},"idempotencyEpoch":{"type":"string"},"admissionClosesAt":{"type":"integer","minimum":0},"recordRetainedUntil":{"type":"integer","minimum":0},"replayed":{"type":"boolean"}},"required":["operationId","projectId","documentId","outcome","beforeRevision","revision","versionId","contentHash","payloadBytes","payloadLines","appendedBytes","appendedLines","sizeBytes","lineCount","committedAt","idempotencyEpoch","admissionClosesAt","recordRetainedUntil","replayed"],"additionalProperties":false},"DocumentAppendInput":{"type":"object","properties":{"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"idempotencyEpoch":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:-]+$"},"content":{"type":"string","maxLength":65536,"description":"Exact UTF-8 text, at most 65,536 encoded bytes. No trimming or Unicode normalization. Final document at most 10,000,000 bytes; normal publication quotas/history limits also apply."},"separator":{"type":"string","enum":["none","lf","crlf"],"default":"none","description":"Explicitly inserted only when both existing and appended bodies are nonempty."}},"required":["expectedRevision","idempotencyEpoch","idempotencyKey","content"],"additionalProperties":false},"ServiceGuidance":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"kind":{"type":"string","enum":["advisory","throttled","unavailable"]},"reason":{"type":"string","enum":["property-write-advisory","property-write-throttled","property-write-budget-unavailable","service-request-throttled","service-request-budget-unavailable"]},"scope":{"type":"string","enum":["document","project","team","database","principal","service"]},"message":{"type":"string","minLength":1,"maxLength":512},"actions":{"type":"array","maxItems":5,"items":{"type":"string","enum":["pause","batch","skip-unchanged","coordinate-writers","retain-operation-identity"]}},"retryAfterSeconds":{"type":"integer","minimum":1}},"required":["version","kind","reason","scope","message","actions"],"additionalProperties":false},"DocumentRestoreRequest":{"type":"object","properties":{"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"expectedHeadVersionId":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"idempotencyEpoch":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."}},"required":["expectedRevision"],"additionalProperties":false,"oneOf":[{"not":{"anyOf":[{"required":["expectedHeadVersionId"]},{"required":["idempotencyEpoch"]},{"required":["idempotencyKey"]}]}},{"required":["expectedHeadVersionId","idempotencyEpoch","idempotencyKey"]}]},"DocumentMetadata":{"oneOf":[{"type":"object","properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"availability":{"type":"string","enum":["enabled"]},"head":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false},"target":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false},"epoch":{"type":"object","properties":{"idempotencyEpoch":{"type":"string"},"recoveryIncarnation":{"type":"string"},"admissionClosesAt":{"type":"integer"},"recordRetainedUntil":{"type":"integer"}},"required":["idempotencyEpoch","recoveryIncarnation","admissionClosesAt","recordRetainedUntil"],"additionalProperties":false},"annotations":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true}},"required":["revision","sequence","updateId"],"additionalProperties":false},"versionMetadata":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true}},"required":["revision","sequence","updateId"],"additionalProperties":false}},"required":["projectId","documentId","availability","head","target","epoch","annotations","versionMetadata"],"additionalProperties":false},{"type":"object","properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"availability":{"type":"string","enum":["inactive"]},"reason":{"type":"string","enum":["data-protection-conversion"]}},"required":["projectId","documentId","availability","reason"],"additionalProperties":false,"description":"A still-inactive baseline is deferred during Advanced Data Protection ENABLING, DISABLING or BLOCKED. This read-only metadata response contains no version or revision tokens; read metadata again after conversion completes."}]},"DocumentProperties":{"type":"object","properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"availability":{"type":"string","enum":["enabled"]},"head":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false},"target":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false},"epoch":{"type":"object","properties":{"idempotencyEpoch":{"type":"string"},"recoveryIncarnation":{"type":"string"},"admissionClosesAt":{"type":"integer"},"recordRetainedUntil":{"type":"integer"}},"required":["idempotencyEpoch","recoveryIncarnation","admissionClosesAt","recordRetainedUntil"],"additionalProperties":false},"annotations":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true},"attribution":{"type":"object","additionalProperties":true},"custom":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}}},"required":["revision","sequence","updateId","attribution","custom"],"additionalProperties":false},"versionMetadata":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true},"attribution":{"type":"object","additionalProperties":true},"custom":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"extracted":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"claims":{"type":"object","properties":{"extractor":{"type":"string","maxLength":64},"extractorVersion":{"type":"string","maxLength":64},"externalRunId":{"type":"string","maxLength":64}},"required":[],"additionalProperties":false,"nullable":true}},"required":["revision","sequence","updateId","attribution","custom","extracted","claims"],"additionalProperties":false}},"required":["projectId","documentId","availability","head","target","epoch","annotations","versionMetadata"],"additionalProperties":false},"DocumentPropertiesPatch":{"type":"object","properties":{"idempotencyEpoch":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"expectedHeadVersionId":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"expectedAnnotationsRevision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"custom":{"type":"object","properties":{"set":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"remove":{"type":"array","uniqueItems":true,"maxItems":64,"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"}}},"required":[],"additionalProperties":false}},"required":["idempotencyEpoch","idempotencyKey","expectedAnnotationsRevision","custom"],"additionalProperties":false},"VersionMetadataPatch":{"type":"object","properties":{"idempotencyEpoch":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"expectedHeadVersionId":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"expectedMetadataRevision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"custom":{"type":"object","properties":{"set":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"remove":{"type":"array","uniqueItems":true,"maxItems":64,"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"}}},"required":[],"additionalProperties":false},"extracted":{"type":"object","properties":{"set":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"remove":{"type":"array","uniqueItems":true,"maxItems":64,"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"}}},"required":[],"additionalProperties":false},"claims":{"type":"object","properties":{"extractor":{"type":"string","maxLength":64},"extractorVersion":{"type":"string","maxLength":64},"externalRunId":{"type":"string","maxLength":64}},"required":[],"additionalProperties":false}},"required":["idempotencyEpoch","idempotencyKey","expectedMetadataRevision"],"additionalProperties":false,"anyOf":[{"required":["custom"]},{"required":["extracted"]}]},"PropertyUpdateReceipt":{"type":"object","properties":{"updateId":{"type":"string"},"operationId":{"type":"string"},"kind":{"type":"string","enum":["annotations","version-metadata","publish","restore","copy"]},"outcome":{"type":"string","enum":["committed","unchanged","suppressed","failed"]},"projectId":{"type":"string"},"documentId":{"type":"string"},"versionId":{"type":"string","nullable":true},"observedHeadVersionId":{"type":"string"},"metadataRevision":{"type":"string"},"annotationsRevision":{"type":"string"},"committedAt":{"type":"string"},"attribution":{"type":"object","additionalProperties":true},"auditEventId":{"type":"string","nullable":true},"producer":{"type":"object"},"restoredFromVersionId":{"type":"string"}},"required":["updateId","operationId","kind","outcome","projectId","documentId","versionId","observedHeadVersionId","committedAt","attribution","auditEventId"],"additionalProperties":false},"PropertyHistorySelection":{"type":"object","properties":{"annotationRevisionIds":{"type":"array","uniqueItems":true,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":200}},"metadataRevisionIds":{"type":"array","uniqueItems":true,"maxItems":100,"items":{"type":"string","minLength":1,"maxLength":200}}},"required":[],"additionalProperties":false,"description":"1–100 IDs total. Existing owner/admin permanent-delete authority and versioning capability required. Protected/current/missing/crossed targets conflict; no automatic pruning."},"DocumentPropertyFilter":{"oneOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["annotations"]},"namespace":{"type":"string","enum":["custom"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"operator":{"type":"string","enum":["exists"]}},"required":["scope","namespace","key","operator"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["annotations"]},"namespace":{"type":"string","enum":["custom"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"operator":{"type":"string","enum":["eq"]},"value":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}},"required":["scope","namespace","key","operator","value"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["currentVersion"]},"namespace":{"type":"string","enum":["custom","extracted"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"operator":{"type":"string","enum":["exists"]}},"required":["scope","namespace","key","operator"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["currentVersion"]},"namespace":{"type":"string","enum":["custom","extracted"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$"},"operator":{"type":"string","enum":["eq"]},"value":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}},"required":["scope","namespace","key","operator","value"],"additionalProperties":false}]},"Document":{"type":"object","properties":{"id":{"type":"string"},"logicalName":{"type":"string"},"sourceFormat":{"type":"string"},"detectedFormat":{"type":"string"},"detectionConfidence":{"type":"number"},"formatPinned":{"type":"boolean"},"validationStatus":{"type":"string","enum":["valid","invalid",null],"nullable":true},"validationMessage":{"type":"string","nullable":true},"contentHash":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"version":{"type":"string","description":"Release label when present; otherwise the string 1. This projection does not write a release label to storage."},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"status":{"type":"string","enum":["active","archived","deleted"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"sourceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256 of the exact source bytes returned. Present only on a current full read of an ordinary (unprotected) document, never on historical snapshots; use it as expectedSourceSha256 on update."},"displayOptions":{"type":"object","additionalProperties":true},"readOnly":{"type":"boolean"},"endpointSources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["id","name","projectId","documentId"],"additionalProperties":false}},"appendEpoch":{"type":"object","properties":{"documentId":{"type":"string"},"idempotencyEpoch":{"type":"string"},"admissionClosesAt":{"type":"integer","minimum":0},"recordRetainedUntil":{"type":"integer","minimum":0}},"required":["documentId","idempotencyEpoch","admissionClosesAt","recordRetainedUntil"],"additionalProperties":false}},"required":["id","logicalName","sourceFormat","detectedFormat","detectionConfidence","formatPinned","validationStatus","validationMessage","contentHash","sizeBytes","version","revision","status","createdAt","updatedAt","sourceSha256","displayOptions","readOnly","endpointSources","appendEpoch"],"additionalProperties":true},"DocumentSnapshot":{"type":"object","properties":{"id":{"type":"string"},"artifactId":{"type":"string"},"projectId":{"type":"string"},"createdAt":{"type":"string"},"userId":{"type":"string","nullable":true},"actorName":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"sourceFormat":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"contentHash":{"type":"string"},"content":{"type":"string"},"versionId":{"type":"string","nullable":true},"sourceIdentity":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false,"nullable":true},"propertyAvailability":{"type":"string","enum":["enabled","inactive"]}},"required":["id","artifactId","projectId","createdAt","userId","actorName","changeNote","sourceFormat","sizeBytes","contentHash","content","versionId","sourceIdentity","propertyAvailability"],"additionalProperties":false},"DocumentVersionPage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"userId":{"type":"string","nullable":true},"actorName":{"type":"string","nullable":true},"changeNote":{"type":"string","nullable":true},"sizeBytes":{"type":"integer","minimum":0},"sourceFormat":{"type":"string"}},"required":["id","createdAt","userId","actorName","changeNote","sizeBytes","sourceFormat"],"additionalProperties":false}},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"}},"required":["items","limit","offset","hasMore"],"additionalProperties":false},"DocumentSharePage":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"artifactId":{"type":"string"},"token":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"name":{"type":"string"},"namespace":{"type":"string"},"passwordProtected":{"type":"boolean"},"brandAssetId":{"type":"string","nullable":true},"url":{"type":"string"}},"required":["id","projectId","artifactId","token","createdAt","expiresAt","revokedAt","passwordProtected","brandAssetId","url"],"additionalProperties":false}},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"}},"required":["items","limit","offset","hasMore"],"additionalProperties":false},"DocumentWriteResult":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string","enum":["create","update","no-op"]}},"required":["document","decision"],"additionalProperties":false},"DocumentGuard":{"type":"object","properties":{"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."}},"required":["expectedRevision"],"additionalProperties":false},"DocumentArchiveRestore":{"type":"object","properties":{"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"resolveNameConflict":{"type":"boolean","enum":[true]}},"required":["expectedRevision"],"additionalProperties":false},"DocumentUpdate":{"type":"object","properties":{"content":{"type":"string"},"format":{"type":"string"},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"expectedSourceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Optional content-only precondition: the sourceSha256 of the bytes this edit is based on. Checked atomically with the commit in addition to expectedRevision (both must hold); a mismatch is 409 document-changed. Not available for protected documents."},"changeNote":{"type":"string","maxLength":2000}},"required":["content","expectedRevision"],"additionalProperties":false},"DocumentMove":{"type":"object","properties":{"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"destinationFolderId":{"type":"string","minLength":1,"maxLength":200},"expectedDestinationPath":{"type":"string","maxLength":400}},"required":["expectedRevision","destinationFolderId","expectedDestinationPath"],"additionalProperties":false},"DocumentRename":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."}},"required":["name","expectedRevision"],"additionalProperties":false},"DocumentDisplayOptions":{"type":"object","properties":{"displayOptions":{"type":"object","additionalProperties":true},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."}},"required":["displayOptions","expectedRevision"],"additionalProperties":false},"DocumentShareCreate":{"type":"object","properties":{"name":{"type":"string"},"password":{"type":"string"},"brandAssetId":{"type":"string"},"acknowledgeSensitive":{"type":"boolean"},"expiresInDays":{"type":"integer","nullable":true,"enum":[30,60,90,365,null],"description":"Lifetime in elapsed 24-hour days (365 = 1 year). Omit for 30 days; null means Never. Never links remain revocable and obey document access and team sharing policy."}},"required":[],"additionalProperties":false},"DocumentPublish":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Leaf name; defaults to document. The target folder travels in folderPath."},"logicalName":{"type":"string","maxLength":200,"description":"Legacy leaf-name alias; folders still travel in folderPath."},"content":{"type":"string","minLength":1,"description":"Complete source text to create or explicitly replace."},"markdown":{"type":"string","minLength":1,"description":"Legacy source-text alias."},"changeNote":{"type":"string","maxLength":2000,"description":"Optional summary saved with the document version."},"format":{"type":"string"},"contentType":{"type":"string"},"folderPath":{"type":"string","description":"Project folder path; an empty string means the root."},"ifNotExists":{"type":"boolean","description":"True explicitly requests creation only. False does not grant replacement authority."},"expectedId":{"type":"string","minLength":1,"maxLength":120,"description":"Captured stable document ID at this destination; requires expectedRevision."},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"createFolders":{"type":"boolean","default":false},"copyFrom":{"type":"object","properties":{"logicalName":{"type":"string"},"id":{"type":"string"},"contentHash":{"type":"string"}},"required":["logicalName","id","contentHash"],"additionalProperties":false}},"required":[],"additionalProperties":true,"description":"Create only by default. Replacement requires both captured expectedId and expectedRevision; storage atomically checks identity, path and state. Copying always creates a new document.","oneOf":[{"anyOf":[{"required":["content"]},{"required":["markdown"]}],"not":{"anyOf":[{"required":["expectedId"]},{"required":["expectedRevision"]},{"required":["copyFrom"]}]}},{"anyOf":[{"required":["content"]},{"required":["markdown"]}],"required":["expectedId","expectedRevision"],"not":{"anyOf":[{"required":["copyFrom"]},{"required":["ifNotExists"],"properties":{"ifNotExists":{"enum":[true]}}}]}},{"not":{"anyOf":[{"required":["expectedId"]},{"required":["expectedRevision"]}]},"required":["name","copyFrom"]}]},"DocumentUploadEntry":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Leaf name; defaults to document. The target folder travels in folderPath."},"logicalName":{"type":"string","maxLength":200,"description":"Legacy leaf-name alias; folders still travel in folderPath."},"content":{"type":"string","minLength":1,"description":"Complete source text to create or explicitly replace."},"markdown":{"type":"string","minLength":1,"description":"Legacy source-text alias."},"changeNote":{"type":"string","maxLength":2000,"description":"Optional summary saved with the document version."},"format":{"type":"string"},"contentType":{"type":"string"},"folderPath":{"type":"string","description":"Project folder path; an empty string means the root."},"ifNotExists":{"type":"boolean","description":"True explicitly requests creation only. False does not grant replacement authority."},"expectedId":{"type":"string","minLength":1,"maxLength":120,"description":"Captured stable document ID at this destination; requires expectedRevision."},"expectedRevision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."}},"required":[],"additionalProperties":true,"anyOf":[{"required":["content"]},{"required":["markdown"]}],"oneOf":[{"not":{"anyOf":[{"required":["expectedId"]},{"required":["expectedRevision"]}]}},{"required":["expectedId","expectedRevision"],"not":{"anyOf":[{"required":["copyFrom"]},{"required":["ifNotExists"],"properties":{"ifNotExists":{"enum":[true]}}}]}}]},"DocumentUpload":{"type":"object","properties":{"documents":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/DocumentUploadEntry"}},"folderPath":{"type":"string"},"createFolders":{"type":"boolean","default":false}},"required":["documents"],"additionalProperties":true}},"securitySchemes":{"bearerAuth":{"type":"oauth2","description":"OAuth 2.1 access token from auth.markdownlogic.com.","flows":{"authorizationCode":{"authorizationUrl":"https://auth.markdownlogic.com/oauth/authorize","tokenUrl":"https://auth.markdownlogic.com/oauth/token","scopes":{"notifications:manage":"Manage own notification channels and history through an active first-party application; not available to machine or dynamically registered clients"}},"clientCredentials":{"tokenUrl":"https://auth.markdownlogic.com/oauth/token","scopes":{"projects:read":"Read teams, projects and their metadata","documents:read":"Read document content, renders and versions","documents:write":"Create and modify documents, projects and shares","releases:read":"Read snapshots and releases","access-keys:manage":"Manage credentials, team members and billing"}}}}}},"tags":[{"name":"Account"},{"name":"Admin"},{"name":"Auth"},{"name":"Billing"},{"name":"Credentials"},{"name":"Documents"},{"name":"Endpoints"},{"name":"Folders"},{"name":"Library"},{"name":"Platform"},{"name":"Projects"},{"name":"Releases"},{"name":"Renders"},{"name":"Repositories"},{"name":"Search"},{"name":"Security"},{"name":"Shares"},{"name":"Teams"},{"name":"Templates"},{"name":"Variables"},{"name":"Versions"},{"name":"Webhooks"}],"paths":{"/api/v1/admin/announcements":{"get":{"summary":"List site announcement drafts and published items. Accepts a numeric before cursor and limit from 1 to 50.","tags":["Admin"],"operationId":"getApiV1AdminAnnouncements","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a site announcement draft. JSON: title, category, summary, bodyHtml.","tags":["Admin"],"operationId":"postApiV1AdminAnnouncements","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/announcements/{announcementId}":{"delete":{"summary":"Remove a site announcement at the expected revision. JSON: revision.","tags":["Admin"],"operationId":"deleteApiV1AdminAnnouncementsAnnouncementId}","parameters":[{"name":"announcementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"Get a site announcement draft or published item.","tags":["Admin"],"operationId":"getApiV1AdminAnnouncementsAnnouncementId}","parameters":[{"name":"announcementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Edit a site announcement at the expected revision. JSON: title, category, summary, bodyHtml, revision. Published edits keep their original publication order.","tags":["Admin"],"operationId":"patchApiV1AdminAnnouncementsAnnouncementId}","parameters":[{"name":"announcementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/announcements/{announcementId}/publish":{"post":{"summary":"Publish a site announcement draft at the expected revision. JSON: revision.","tags":["Admin"],"operationId":"postApiV1AdminAnnouncementsAnnouncementIdPublish","parameters":[{"name":"announcementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/archived/artifacts":{"get":{"summary":"Archived documents across the platform (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminArchivedArtifacts","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/archived/projects":{"get":{"summary":"Archived projects across the platform (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminArchivedProjects","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/billing-events":{"get":{"summary":"Stripe events as received, in order, with their processing outcome (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminBillingEvents","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/billing/stripe-sync":{"get":{"summary":"Preview a Stripe sync (sysadmin): the plan feature text that would be written to Stripe, the catalog rows that would change, the Stripe mode, the environment and a `previewHash`. Writes nothing. When the Stripe key does not match the environment it does not call Stripe: it answers 200 with `applyAllowed` false, a `refusal` and no `previewHash`. 502 when Stripe answers with a server error.","tags":["Admin"],"operationId":"getApiV1AdminBillingStripeSync","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"The preview. A key in the wrong mode is a 200 with applyAllowed false and the reason in refusal.","content":{"application/json":{"schema":{"type":"object","required":["environment","stripeMode","applyAllowed","refusal","previewHash","features","catalog","catalogSyncedAt","lastRuns"],"properties":{"environment":{"type":"string","enum":["production","staging","local","unknown"]},"stripeMode":{"type":"string","description":"The mode of the key and of the objects Stripe listed: live, test, mixed or not set."},"applyAllowed":{"type":"boolean","description":"False when the key or the listed objects are in the wrong mode for this environment."},"refusal":{"type":"string","nullable":true,"description":"The reason code when applyAllowed is false, otherwise null."},"previewHash":{"type":"string","nullable":true,"pattern":"^[0-9a-f]{64}$","description":"Quote it in the apply. Null when there is no plan."},"features":{"type":"object","nullable":true,"properties":{"writes":{"type":"array","items":{"type":"object","additionalProperties":true}},"upToDate":{"type":"array","items":{"type":"object","additionalProperties":true}},"refused":{"type":"array","items":{"type":"object","additionalProperties":true}},"outOfScope":{"type":"integer"}}},"catalog":{"type":"object","nullable":true,"properties":{"changes":{"type":"array","items":{"type":"object","additionalProperties":true}},"unchanged":{"type":"integer"},"deactivations":{"type":"array","items":{"type":"object","additionalProperties":true}},"withheld":{"type":"array","items":{"type":"object","additionalProperties":true}},"skipped":{"type":"integer"},"unmatched":{"type":"array","items":{"type":"string"}},"soldPlansWithoutPrice":{"type":"array","items":{"type":"string"}}}},"catalogSyncedAt":{"type":"string","nullable":true},"lastRuns":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"429":{"description":"Rate limited: either this route’s own limiter, or Stripe answered 429 (stripe-rate-limited)."},"502":{"description":"Stripe failed (stripe-error) or did not have the object (stripe-not-found)."},"503":{"description":"Stripe is not usable from this worker: no key (stripe-key-missing), a rejected key (stripe-key-rejected) or a key without permission (stripe-permission-denied)."}}},"post":{"summary":"Apply a previewed Stripe sync (sysadmin). `{ \"previewHash\": string, \"environment\": string }`, both from the preview. Writes Stripe first, then the catalog, and is audited. A partial write answers 200 with `complete` false. 400 when the hash is missing or malformed, 409 when Stripe or the catalog changed since the preview, 422 when the environment or the Stripe key mode does not match, 429 when throttled, 502 when Stripe answers with a server error.","tags":["Admin"],"operationId":"postApiV1AdminBillingStripeSync","parameters":[],"x-required-scope":"admin:*","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["previewHash","environment"],"properties":{"previewHash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The previewHash of the preview the operator reviewed."},"environment":{"type":"string","enum":["production","staging","local","unknown"],"description":"The environment the operator confirmed. Refused with 422 unless it is the one this worker serves."}}}}}},"responses":{"200":{"description":"The apply ran. When complete is false a write stopped part-way and the response says what was not written.","content":{"application/json":{"schema":{"type":"object","required":["complete","featuresWritten","featuresFailed","featuresNotAttempted","catalog","catalogNotWritten","withheld","soldPlansWithoutPrice"],"properties":{"complete":{"type":"boolean","description":"False when a Stripe write or the catalogue write stopped part-way. Not an error status: read the lists."},"featuresWritten":{"type":"array","items":{"type":"object","additionalProperties":true}},"featuresFailed":{"type":"array","items":{"type":"object","additionalProperties":true}},"featuresNotAttempted":{"type":"array","items":{"type":"object","additionalProperties":true}},"catalog":{"type":"object","properties":{"upserted":{"type":"integer"},"deactivated":{"type":"integer"}}},"catalogNotWritten":{"type":"array","items":{"type":"string"}},"withheld":{"type":"array","items":{"type":"object","additionalProperties":true}},"soldPlansWithoutPrice":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"The body is not JSON or previewHash is missing or malformed (preview-hash-required)."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"409":{"description":"stale-preview: Stripe or the catalogue changed since the preview. The body carries no hash; preview again."},"422":{"description":"environment-mismatch, or a key or listing in the wrong mode for the environment (stripe-mode-mismatch, stripe-key-unrecognised). Nothing was written."},"429":{"description":"Rate limited: either this route’s own limiter, or Stripe answered 429 (stripe-rate-limited)."},"502":{"description":"Stripe failed (stripe-error) or did not have the object (stripe-not-found)."},"503":{"description":"Stripe is not usable from this worker: no key (stripe-key-missing), a rejected key (stripe-key-rejected) or a key without permission (stripe-permission-denied)."}}}},"/api/v1/admin/billing/sync":{"post":{"summary":"Pull the plan catalog from Stripe now, without a preview (sysadmin). Never writes to Stripe. Deactivates prices Stripe no longer lists, but never takes the last price of a sold plan off sale: that price, and a price whose product stopped naming its sold plan, is reported as `withheld` and left as it was. Only the previewed apply at `POST /admin/billing/stripe-sync` can do that. 422 when the Stripe key mode does not match the environment, 502 when Stripe answers with a server error.","tags":["Admin"],"operationId":"postApiV1AdminBillingSync","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/content-reports":{"get":{"summary":"Content reports from the public report form, newest first, 25 a page (offset, hasMore); status open (the default: open and not held)|reviewing|actioned|dismissed|held (open, in the held lane: a surge, pressure on one network, or a filled honeypot)|all. Each carries a short reporter reference and how many reports that reporter filed in 30 days, never an address; drops counts what was thanked and not stored this week (sampled, lower bounds) and held counts the held lane (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminContentReports","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/content-reports/{content-reportId}":{"get":{"summary":"One content report, with the link it names resolved now (kind, id, team, revokedAt) so a takedown can follow (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminContentReportsContentReportId}","parameters":[{"name":"content-reportId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/content-reports/{content-reportId}/review":{"post":{"summary":"Set a content report's status (open, reviewing, actioned, dismissed) with an optional note up to 1,000 characters; writes a platform-scoped audit row (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminContentReportsContentReportIdReview","parameters":[{"name":"content-reportId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/mail":{"get":{"summary":"Retained outbound mail context and independent submission/provider observations. Immutable exact-ID filters, snapshotAt and keyset paging; sysadmin only.","tags":["Admin"],"operationId":"getApiV1AdminMail","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/mail/{mailId}":{"get":{"summary":"Fresh safe message context, submission attempts, paged provider events and current recipient protection; delivery proves recipient-server acceptance only (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminMailMailId}","parameters":[{"name":"mailId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/mail/unresolved-events":{"get":{"summary":"Up to 100 safe pending or unresolved delivery events requiring correlation attention (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminMailUnresolvedEvents","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/metrics":{"get":{"summary":"Platform counters: accounts, teams, documents, renders (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminMetrics","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/oauth-registrations":{"get":{"summary":"List up to 50 current dynamic client registrations from the last 30 days (sysadmin). Returns unverified names, redirect origins, grant types and whether client-secret authentication is required; never credentials or complete redirect URLs. Registration grants no user-data access.","tags":["Admin"],"operationId":"getApiV1AdminOauthRegistrations","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/open-source-applications":{"get":{"summary":"Sysadmin plus admin:* review queue, at most 25 current applications, newest first. Optional bounded numeric offset; response applications and hasMore. Read again before a decision.","tags":["Admin"],"operationId":"getApiV1AdminOpenSourceApplications","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/projects/{projectId}/artifacts/{logicalName}/restore":{"post":{"summary":"Restore an archived document (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminProjectsProjectIdArtifactsLogicalNameRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/projects/{projectId}/restore":{"post":{"summary":"Restore an archived project (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminProjectsProjectIdRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/public-conversions":{"get":{"summary":"Recent public converter outcomes and operational metadata, seven-day retention, newest 50 events and bounded 24h/5d/10d summaries with explicit incomplete history (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminPublicConversions","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/sandbox/promote":{"post":{"summary":"Promote a sandbox team to a paid plan. Registered only when the worker runs in dev mode; it does not exist in production.","tags":["Admin"],"operationId":"postApiV1AdminSandboxPromote","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/search":{"get":{"summary":"Read platform search settings and the effective system-alert recipient (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminSearch","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Update platform search settings or the shared system-alert recipient; redacted atomic audit and conflict guard (sysadmin).","tags":["Admin"],"operationId":"putApiV1AdminSearch","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/shares/takedown":{"post":{"summary":"Take one public share link down by the URL an abuse report names (sysadmin). `{ \"url\": string, \"reason\"?: string }`: a document, named, project or repository link, with or without its download, unlock, brand or document suffix. The link is revoked the way its owner would revoke it and the takedown is audited to the owning team. 404 when the URL names no link, 409 when it is already revoked. To stop a team from publishing more, set its status to `blocked`.","tags":["Admin"],"operationId":"postApiV1AdminSharesTakedown","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/stripe-quarantine":{"get":{"summary":"Restricted metadata for up to 100 unverified Stripe signature failures. No original bodies or samples in this listing; audited sysadmin access.","tags":["Admin"],"operationId":"getApiV1AdminStripeQuarantine","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/stripe-quarantine/{evidenceId}":{"get":{"summary":"Restricted redacted product/price IDs, email domains and address hashes from an unverified body; not a Stripe event. Original payload unavailable; audited sysadmin access.","tags":["Admin"],"operationId":"getApiV1AdminStripeQuarantineEvidenceId}","parameters":[{"name":"evidenceId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/system-events":{"get":{"summary":"Platform anomalies (unverifiable webhooks, config faults, failed jobs), one row per distinct event with a count (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminSystemEvents","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/system-events/{system-eventId}/review":{"post":{"summary":"Mark a platform anomaly reviewed; a later occurrence reopens it (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminSystemEventsSystemEventIdReview","parameters":[{"name":"system-eventId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/teams":{"get":{"summary":"All teams with plan and usage (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminTeams","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a team for someone by user id or email (sysadmin), for example to set up an Open Source grant. The only way to create a team beyond the one registration makes. Plans are granted by subscription or the plan-override route, never by this one.","tags":["Admin"],"operationId":"postApiV1AdminTeams","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/teams/{teamId}/open-source-application":{"post":{"summary":"Audited application-linked decision. Strict 8 KiB JSON: id UUID, revision positive integer, key UUID, action approve/reject/activate and public team note <=1000. Approval additionally requires a future ISO endsAt. Activate uses that expiry and separately verifies authoritative billing; no Stripe mutation. Current billing fence and free/no-other-override state are atomically checked. Repeated same-key decisions do not extend the grant; stale decisions conflict. Sysadmin plus admin:* required.","tags":["Admin"],"operationId":"postApiV1AdminTeamsTeamIdOpenSourceApplication","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/teams/{teamId}/plan-override":{"post":{"summary":"Grant a time-boxed plan override (sysadmin). The only way to a paid plan other than a subscription. `endsAt` must be in the future and `days` a positive whole number; `{ \"clear\": true }` ends an override.","tags":["Admin"],"operationId":"postApiV1AdminTeamsTeamIdPlanOverride","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/teams/{teamId}/search":{"get":{"summary":"A team's search diagnostics: pending, failed, not-indexed counts, spend and the sensitivity catch-up (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminTeamsTeamIdSearch","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"Diagnostics for this team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchDiagnostics"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/teams/{teamId}/search/rebuild":{"post":{"summary":"Enqueue a fresh backfill of a team's search index; never spends the team's own rebuild allowance (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminTeamsTeamIdSearchRebuild","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"202":{"description":"The rebuild admission result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"rebuild":{"type":"object","additionalProperties":false,"properties":{"enqueued":{"type":"integer","description":"Rows enqueued for backfill by this call. A legitimate no-op success (nothing to enqueue) also reads 0; see `admitted`."},"admitted":{"type":"boolean","description":"Whether this call actually moved the namespace to building. false means the call was refused (already deleting, or search is off) and no rebuild happened, even though `enqueued` is also 0 in that case."}},"required":["enqueued","admitted"]}},"required":["rebuild"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"SEARCH_DELETE_IN_PROGRESS: the vendor delete is in flight. SEARCH_DISABLED: the team has turned search off."}}}},"/api/v1/admin/teams/{teamId}/status":{"post":{"summary":"Suspend or reactivate a team (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminTeamsTeamIdStatus","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/usage":{"get":{"summary":"Activity over time: renders, share reads, webhook deliveries, tool calls (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminUsage","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/users":{"get":{"summary":"All accounts (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminUsers","parameters":[],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/users/{userId}":{"get":{"summary":"One account (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminUsersUserId}","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/users/{userId}/detail":{"get":{"summary":"One account with its teams, projects and recent activity (sysadmin).","tags":["Admin"],"operationId":"getApiV1AdminUsersUserIdDetail","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/users/{userId}/status":{"post":{"summary":"Suspend or reactivate an account (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminUsersUserIdStatus","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/admin/users/{userId}/sysadmin":{"post":{"summary":"Grant or revoke the sysadmin flag (sysadmin).","tags":["Admin"],"operationId":"postApiV1AdminUsersUserIdSysadmin","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"admin:*","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/auth/change-password":{"post":{"summary":"Change the signed-in account password (requires the current one).","tags":["Auth"],"operationId":"postApiV1AuthChangePassword","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/complete":{"post":{"summary":"Finish signup: name, team, password and termsVersion, the Terms of Service version the form showed (refused unless it is the one in force). Records the acceptance and activates the account; sign-in itself happens at the authorization server.","tags":["Auth"],"operationId":"postApiV1AuthComplete","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/email-change/confirm":{"post":{"summary":"Consume an email-change token and apply the new address.","tags":["Auth"],"operationId":"postApiV1AuthEmailChangeConfirm","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/forgot-password":{"post":{"summary":"Send a single-use password reset link. Answers identically for unknown addresses.","tags":["Auth"],"operationId":"postApiV1AuthForgotPassword","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/register":{"post":{"summary":"Register an email address and send a verification link. Answers identically whether or not the address already has an account, and never returns the account.","tags":["Auth"],"operationId":"postApiV1AuthRegister","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/resend-verification":{"post":{"summary":"Send a fresh verification link. Rate-limited, and answers identically for unknown addresses.","tags":["Auth"],"operationId":"postApiV1AuthResendVerification","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/reset-password":{"post":{"summary":"Consume a reset token and set a new password.","tags":["Auth"],"operationId":"postApiV1AuthResetPassword","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/auth/verify":{"post":{"summary":"Verify an email address with its single-use token; returns a setup token.","tags":["Auth"],"operationId":"postApiV1AuthVerify","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/billing":{"get":{"summary":"Billing status for the account’s teams: plan, subscription and invoices. `invoices` is present only for a team where the caller can manage billing (the owner) AND the token holds `access-keys:manage`, the scope the billing actions require; otherwise the key is absent, and no invoice, invoice link or tax jurisdiction is returned. Each invoice carries `createdAt` (when it was issued, as first recorded), `paidAt`, and the service period `periodStart`/`periodEnd` when known. `subscription.interval` is the current billing cycle (`month` or `year`), or null when it cannot be read or the caller cannot manage billing.","tags":["Billing"],"operationId":"getApiV1Billing","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/checkout":{"post":{"summary":"Open a Stripe Checkout session to subscribe to a plan that is sold (any other plan is a 400). `interval` (`month` or `year`) defaults to `month`; a cycle the plan is not sold on is a 400. Rate limited per person and per team (429). The success URL carries `session_id`, which `POST /billing/checkout/complete` takes.","tags":["Billing"],"operationId":"postApiV1BillingCheckout","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/checkout/complete":{"post":{"summary":"Apply a completed Checkout Session on return from Stripe and report what happened: `activated` is read back from the team after applying, `state` is the session’s (`complete`, `open`, `expired`). Idempotent with the webhook.","tags":["Billing"],"operationId":"postApiV1BillingCheckoutComplete","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/plan":{"post":{"summary":"Change the subscription’s plan: immediately when it only adds, at the period end when it removes. `interval` (`month` or `year`) is optional and defaults to the subscription’s current cycle; a cycle the plan is not sold on is a 400, and so is a plan that is not sold.","tags":["Billing"],"operationId":"postApiV1BillingPlan","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/plan/cancel":{"post":{"summary":"Call off a plan change that was scheduled for the end of the period.","tags":["Billing"],"operationId":"postApiV1BillingPlanCancel","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/plan/preview":{"post":{"summary":"What changing to another plan would cost and what it would change, without committing. `interval` (`month` or `year`) is optional and defaults to the subscription’s current cycle; the response echoes `interval` and `currentInterval`.","tags":["Billing"],"operationId":"postApiV1BillingPlanPreview","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/plans":{"get":{"summary":"The public plan catalog synced from Stripe (no authentication). Only plans that are sold are listed.","tags":["Billing"],"operationId":"getApiV1BillingPlans","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/billing/portal":{"post":{"summary":"Open the Stripe Customer Portal to manage an existing subscription. Audited; rate limited per person and per team (429).","tags":["Billing"],"operationId":"postApiV1BillingPortal","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/billing/protection-exit/complete":{"post":{"summary":"Complete the requested move to Free after cancellation and the authorized Leave Data Protection migration. Does not call billing providers or authorize decryption. Returns pending until safe prerequisites hold.","tags":["Billing"],"operationId":"postApiV1BillingProtectionExitComplete","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/contact/unsubscribe":{"get":{"summary":"No-store confirmation page for an expiring, recipient-bound disable-only optional-email capability. GET never changes preferences.","tags":["Account"],"operationId":"getApiV1ContactUnsubscribe","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}},"post":{"summary":"Confirm a product-email or single-watch opt-out. Hashed random capability, fixed purpose and recipient/generation, idempotent, no enabling or redirects. Invalid/expired links direct to authenticated account preferences.","tags":["Account"],"operationId":"postApiV1ContactUnsubscribe","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/content-templates":{"get":{"summary":"Team content templates (document bodies with placeholders).","tags":["Templates"],"operationId":"getApiV1ContentTemplates","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a content template; its placeholders are derived from the body.","tags":["Templates"],"operationId":"postApiV1ContentTemplates","parameters":[],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/content-templates/{templateId}":{"delete":{"summary":"Delete a content template.","tags":["Templates"],"operationId":"deleteApiV1ContentTemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One content template with its derived placeholders.","tags":["Templates"],"operationId":"getApiV1ContentTemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a content template.","tags":["Templates"],"operationId":"patchApiV1ContentTemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/formats/render-options":{"get":{"summary":"The render options each structured format understands, and their defaults.","tags":["Platform"],"operationId":"getApiV1FormatsRenderOptions","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/health/schema":{"get":{"summary":"Schema drift probe: every table the adapter reads, projected once.","tags":["Platform"],"operationId":"getApiV1HealthSchema","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/invitations/accept":{"post":{"summary":"Accept a team invitation with its token.","tags":["Teams"],"operationId":"postApiV1InvitationsAccept","parameters":[],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me":{"get":{"summary":"The current account and its team memberships. A project-restricted credential receives its projectId and a minimal account and team projection. user.defaultEditor is plain, codemirror, visual, or null (no account choice; clients fall back to plain). user.defaultPaperSize is A3, A4, A5, Letter, Legal, or null (document defaults). user.appearance is system, light or dark. System is the default.","tags":["Account"],"operationId":"getApiV1Me","parameters":[],"security":[],"responses":{"200":{"description":"Ordinary account bootstrap, or minimal project bootstrap for a project-restricted credential.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["user","teams","projectId"],"properties":{"projectId":{"type":"string"},"user":{"type":"object","additionalProperties":false,"required":["id","email","name"],"properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string","nullable":true}}},"teams":{"type":"array","minItems":1,"maxItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","name","role"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]}}}}}},{"type":"object","required":["user","teams"],"not":{"required":["projectId"]},"description":"Existing unrestricted or team-bound account bootstrap."}]}}}},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}},"patch":{"summary":"Update the current account profile (name, locale, defaultEditor, defaultPaperSize, appearance). Appearance accepts system, light or dark, and omission preserves it. defaultEditor accepts plain, codemirror, visual, or null to clear; omission preserves it. Invalid IDs or types reject the entire update with 400. The authenticated subject owns the preference. defaultPaperSize accepts A3, A4, A5, Letter, Legal, or null; omission preserves it. Paper choices in a preview/export never update it. Account paper size is a fallback beneath saved project/style/document geometry; explicit request geometry wins. Editor session switches never update it.","tags":["Account"],"operationId":"patchApiV1Me","parameters":[],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/announcements":{"get":{"summary":"List published site announcements for the signed-in account. Accepts a numeric before cursor and limit from 1 to 50.","tags":["Account"],"operationId":"getApiV1MeAnnouncements","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/announcements/{announcementId}/read":{"post":{"summary":"Read one published site announcement and acknowledge it for the signed-in account. Empty JSON object.","tags":["Account"],"operationId":"postApiV1MeAnnouncementsAnnouncementIdRead","parameters":[{"name":"announcementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/announcements/dismiss":{"post":{"summary":"Acknowledge new site announcements through the supplied snapshot boundary for the signed-in account. JSON: through.","tags":["Account"],"operationId":"postApiV1MeAnnouncementsDismiss","parameters":[],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/announcements/summary":{"get":{"summary":"Summarize new site announcements with a dismissal boundary for the signed-in account.","tags":["Account"],"operationId":"getApiV1MeAnnouncementsSummary","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/connected-apps":{"get":{"summary":"OAuth applications this account has authorized, plus the clients it owns. `projectIds` combines the distinct project restrictions of all live grants; null in that array means at least one grant is unrestricted. `lastUsedAt` is when a token was last issued: for an owned client the same value `GET /api/v1/oauth/clients` reports (null when never used); for another party’s client, the last token issued on this account’s behalf.","tags":["Account"],"operationId":"getApiV1MeConnectedApps","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"Applications and every live user-grant boundary.","content":{"application/json":{"schema":{"type":"object","required":["apps"],"properties":{"apps":{"type":"array","items":{"type":"object","required":["clientId","name","scopes","projectIds","grantedAt","isOwn","revoked","lastUsedAt"],"properties":{"clientId":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string","nullable":true},"description":"Distinct project ceilings across all live grants for this application. A null entry represents an unrestricted grant; a mixed list must not be presented as fully project-restricted."},"grantedAt":{"type":"string","format":"date-time"},"isOwn":{"type":"boolean"},"revoked":{"type":"boolean"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"}}}}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/connected-apps/{clientId}/revoke":{"post":{"summary":"Revoke an application’s access to this account (and the client itself, if the account owns it).","tags":["Account"],"operationId":"postApiV1MeConnectedAppsClientIdRevoke","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/contact-preferences":{"get":{"summary":"Own product/project email preferences with revision and current delivery restriction. Team-bound credentials cannot act on personal email preferences.","tags":["Account"],"operationId":"getApiV1MeContactPreferences","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Save own strict boolean productEmails/projectEmails plus expected revision. Stale saves conflict. Disabling project email cancels watches; re-enabling never restarts them. Necessary notices are unaffected.","tags":["Account"],"operationId":"putApiV1MeContactPreferences","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/credentials":{"get":{"summary":"The signed-in person’s credential status: own userId, password configured boolean, registered passkey count and observedAt. Private, no-store. Requires access-keys:manage; machine and team-bound credentials are refused. Returns no credential identifiers or secrets.","tags":["Account"],"operationId":"getApiV1MeCredentials","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/deletion-request":{"delete":{"summary":"Cancel a pending account deletion.","tags":["Account"],"operationId":"deleteApiV1MeDeletionRequest","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Start a 14-day account-deletion grace window. Refused if the account owns any team.","tags":["Account"],"operationId":"postApiV1MeDeletionRequest","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/email/change":{"post":{"summary":"Request an email change. Accepted requests return the same neutral response regardless of target eligibility; an eligible NEW address receives a single-use confirmation link. The address changes only after confirmation.","tags":["Account"],"operationId":"postApiV1MeEmailChange","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/export":{"get":{"summary":"A ZIP of every document in every team this account belongs to, plus profile JSON and the account’s own audit and sign-in history. Explicit include=notifications additionally requires a current first-party notifications:manage sign-in and adds secret-free own choices, device/channel summaries and currently authorized notification history. Notification inclusion scans at most 1000 raw History rows and returns at most 100 device summaries within 8 MiB JSON. Complete metadata has a 10000-record scan ceiling per family and fails clearly if too large. Both sections disclose truncation and usable historyCursor/deviceCursor continuation on the same explicit export; no notification inclusion is granted to old document-only credentials. Default export and documents:read remain unchanged (audit-history.json; each event is marked `relation`: `byYou`, or `aboutYourAccount` for failed sign-ins at the address, replayed-token revocations and operator actions).","tags":["Account"],"operationId":"getApiV1MeExport","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string","enum":["notifications"]},"description":"Explicit additional current first-party notification authority is required. Default document/API-key export is unchanged."},{"name":"historyCursor","in":"query","required":false,"schema":{"type":"string","maxLength":512},"description":"With include=notifications only: pass the corresponding returned nextCursor, or resumeCursor for a completed section while continuing the other. Mutable keyset continuation; not a global point-in-time snapshot."},{"name":"deviceCursor","in":"query","required":false,"schema":{"type":"string","maxLength":512},"description":"With include=notifications only: pass the corresponding returned nextCursor, or resumeCursor for a completed section while continuing the other. Mutable keyset continuation; not a global point-in-time snapshot."}],"x-required-scope":"documents:read","responses":{"200":{"description":"ZIP with source, profile and own audit history; optionally notifications.json with saved choices, channel/device summaries, authorized normalized history and explicit bounded-result metadata.","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid continuation or complete metadata exceeds its 10000-record indexed scan or 8 MiB total notification JSON budget."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"The explicit notification inclusion requires a current first-party notifications:manage sign-in as well as documents:read."},"404":{"description":"Not found"},"409":{"description":"Included History or current authority changed during archive assembly; retry."}}}},"/api/v1/me/notification-devices":{"get":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"getApiV1MeNotificationDevices","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":50}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":512}},{"name":"installationId","in":"query","schema":{"type":"string","format":"uuid"},"description":"Owner-filtered zero/one lookup; cannot be combined with cursor."}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"devices":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]}},"nextCursor":{"type":"string","maxLength":512,"nullable":true},"registration":{"type":"object","additionalProperties":false,"properties":{"requiresExplicitTypeSelection":{"type":"boolean","enum":[true]},"namespaces":{"type":"array","maxItems":16,"items":{"type":"object","additionalProperties":false,"properties":{"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"available":{"type":"boolean"},"reason":{"type":"string","enum":["ready","not_configured","temporarily_unavailable","limit_reached"]}},"required":["appId","provider","providerEnvironment","available","reason"]}}},"required":["requiresExplicitTypeSelection","namespaces"]}},"required":["devices","nextCursor","registration"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/{installationId}":{"delete":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"deleteApiV1MeNotificationDevicesInstallationId}","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true}},"required":["operationId","expectedRevision","expectedBindingGeneration"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"}},"required":["device","operationId"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}},"patch":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"patchApiV1MeNotificationDevicesInstallationId}","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"providerHandle":{"type":"string","minLength":1,"maxLength":4096,"writeOnly":true,"description":"Maximum4096 UTF-8 bytes. Entire body maximum16384 bytes."},"displayName":{"type":"string","minLength":1,"maxLength":80},"consent":{"type":"string","enum":["enabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]}},"required":["operationId","expectedRevision","expectedBindingGeneration","appId","provider","providerEnvironment","providerHandle","displayName","consent","permission"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"}},"required":["device","operationId"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}},"put":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"putApiV1MeNotificationDevicesInstallationId}","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"providerHandle":{"type":"string","minLength":1,"maxLength":4096,"writeOnly":true,"description":"Maximum4096 UTF-8 bytes. Entire body maximum16384 bytes."},"displayName":{"type":"string","minLength":1,"maxLength":80},"consent":{"type":"string","enum":["enabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]}},"required":["operationId","expectedRevision","expectedBindingGeneration","appId","provider","providerEnvironment","providerHandle","displayName","consent","permission"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"},"cleanupToken":{"type":"string","minLength":43,"maxLength":43}},"required":["device","operationId","cleanupToken"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/{installationId}/inspect":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1MeNotificationDevicesInstallationIdInspect","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]}},"required":["operationId","appId","provider","providerEnvironment"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]}},"required":["operationId","revision","bindingGeneration","state"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/{installationId}/pause":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1MeNotificationDevicesInstallationIdPause","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"reason":{"type":"string","enum":["user","permission"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]}},"required":["operationId","expectedRevision","expectedBindingGeneration","appId","provider","providerEnvironment","reason","permission"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"}},"required":["device","operationId"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/{installationId}/rebind":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1MeNotificationDevicesInstallationIdRebind","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"providerHandle":{"type":"string","minLength":1,"maxLength":4096,"writeOnly":true,"description":"Maximum4096 UTF-8 bytes. Entire body maximum16384 bytes."},"displayName":{"type":"string","minLength":1,"maxLength":80},"consent":{"type":"string","enum":["enabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]}},"required":["operationId","expectedRevision","expectedBindingGeneration","appId","provider","providerEnvironment","providerHandle","displayName","consent","permission"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"},"cleanupToken":{"type":"string","minLength":43,"maxLength":43}},"required":["device","operationId","cleanupToken"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/{installationId}/resume":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1MeNotificationDevicesInstallationIdResume","parameters":[{"name":"installationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"MDL-Device-Challenge","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"MDL-Device-Signature","in":"header","required":true,"schema":{"type":"string","minLength":86,"maxLength":86,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"expectedRevision":{"type":"integer","minimum":0},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"providerHandle":{"type":"string","minLength":1,"maxLength":4096,"writeOnly":true,"description":"Maximum4096 UTF-8 bytes. Entire body maximum16384 bytes."},"displayName":{"type":"string","minLength":1,"maxLength":80},"consent":{"type":"string","enum":["enabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]}},"required":["operationId","expectedRevision","expectedBindingGeneration","appId","provider","providerEnvironment","providerHandle","displayName","consent","permission"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"device":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"accountId":{"type":"string"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"displayName":{"type":"string","minLength":1,"maxLength":80},"channelId":{"type":"string","nullable":true},"revision":{"type":"integer","minimum":1},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"consent":{"type":"string","enum":["enabled","disabled"]},"permission":{"type":"object","additionalProperties":false,"properties":{"observedAt":{"type":"string","format":"date-time"},"platform":{"type":"string","enum":["ios","android"]},"authorization":{"type":"string","enum":["not_determined","authorized","denied","provisional","ephemeral","unknown","unavailable"]},"appNotificationsEnabled":{"type":"boolean","nullable":true},"alertEnabled":{"type":"boolean","nullable":true},"notificationCenterEnabled":{"type":"boolean","nullable":true},"platformChannelEnabled":{"type":"boolean","nullable":true},"requestability":{"type":"string","enum":["request","rationale","settings","unknown","unavailable"]}},"required":["observedAt","platform","authorization","appNotificationsEnabled","alertEnabled","notificationCenterEnabled","platformChannelEnabled","requestability"]},"state":{"type":"string","enum":["enabled","paused","detached","removed","invalid","stale"]},"lastSeenAt":{"type":"string","format":"date-time"},"leaseExpiresAt":{"type":"string","format":"date-time"},"selectable":{"type":"boolean"}},"required":["installationId","accountId","appId","provider","providerEnvironment","displayName","channelId","revision","bindingGeneration","consent","permission","state","lastSeenAt","leaseExpiresAt","selectable"]},"operationId":{"type":"string","format":"uuid"},"cleanupToken":{"type":"string","minLength":43,"maxLength":43}},"required":["device","operationId","cleanupToken"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notification-devices/challenges":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1MeNotificationDevicesChallenges","parameters":[],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"installationId":{"type":"string","format":"uuid"},"appId":{"type":"string","minLength":1,"maxLength":200},"provider":{"type":"string","enum":["apns","fcm"]},"providerEnvironment":{"type":"string","enum":["sandbox","production"]},"action":{"type":"string","enum":["enroll","refresh","pause","resume","rebind","inspect"]},"expectedRevision":{"type":"integer","minimum":0,"nullable":true},"expectedBindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$","nullable":true},"publicKey":{"type":"object","additionalProperties":false,"properties":{"kty":{"type":"string","enum":["EC"]},"crv":{"type":"string","enum":["P-256"]},"x":{"type":"string","minLength":43,"maxLength":43},"y":{"type":"string","minLength":43,"maxLength":43}},"required":["kty","crv","x","y"]}},"required":["installationId","appId","provider","providerEnvironment","action","expectedRevision","expectedBindingGeneration","publicKey"]}}}},"responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"challengeId":{"type":"string","format":"uuid"},"nonce":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"expiresAt":{"type":"string","format":"date-time"}},"required":["challengeId","nonce","expiresAt"]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notifications":{"get":{"summary":"List own account channels, virtual required email metadata, legacy product/project consent and selected daily watches. Optional registration readiness and delivery-held state are distinct from legacy/required email availability. No provider handles or credentials. Requires a real user and current active first-party client provenance with notifications:manage; team-bound and machine clients are refused.","tags":["Account"],"operationId":"getApiV1MeNotifications","parameters":[],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"chatProviders":{"type":"object","properties":{"slack":{"type":"object","properties":{"registration":{"type":"string","enum":["ready","unavailable"]}},"required":["registration"],"additionalProperties":false},"teams":{"type":"object","properties":{"health":{"type":"object","properties":{"scope":{"type":"string","enum":["registration","target"]},"state":{"type":"string","enum":["registration_required","policy_blocked","reconnect_required","refused"]},"reason":{"type":"string","enum":["teams_bot_not_registered","teams_registration_invalid","teams_admin_policy","teams_conversation_blocked","teams_reinstall_required","teams_conversation_missing","teams_unsupported_host","teams_permissions_missing"]},"observedAt":{"type":"string","format":"date-time"}},"required":["scope","state","reason","observedAt"],"additionalProperties":false,"nullable":true},"registration":{"type":"string","enum":["ready","unavailable"]},"capability":{"type":"string","enum":["exact_install_selected"]},"broadChannelSupport":{"type":"string","enum":["unqualified"]}},"required":["health","registration","capability","broadChannelSupport"],"additionalProperties":false}},"required":["slack","teams"],"additionalProperties":false},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","push","slack","teams"]},"label":{"type":"string","maxLength":320},"state":{"type":"string","enum":["active","paused","removed"]},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"selectedCount":{"type":"integer","minimum":0},"requiredSecurity":{"type":"boolean"},"optionalRegistration":{"type":"string","enum":["ready","unavailable"]},"optionalDelivery":{"type":"string","enum":["ready","held","unavailable","paused","removed"]},"providerHealth":{"type":"object","properties":{"scope":{"type":"string","enum":["registration","target"]},"state":{"type":"string","enum":["registration_required","policy_blocked","reconnect_required","refused"]},"reason":{"type":"string","enum":["teams_bot_not_registered","teams_registration_invalid","teams_admin_policy","teams_conversation_blocked","teams_reinstall_required","teams_conversation_missing","teams_unsupported_host","teams_permissions_missing"]},"observedAt":{"type":"string","format":"date-time"}},"required":["scope","state","reason","observedAt"],"additionalProperties":false,"nullable":true},"connectionStatus":{"type":"string","enum":["ready","reconnect_required","unavailable"]},"providerIdentity":{"type":"object","properties":{"providerId":{"type":"string"},"providerLabel":{"type":"string"},"channelId":{"type":"string"},"channelLabel":{"type":"string"},"appId":{"type":"string"},"teamId":{"type":"string","nullable":true},"verifiedAt":{"type":"string","format":"date-time","nullable":true}},"required":["providerId","providerLabel","channelId","channelLabel","appId","teamId","verifiedAt"],"additionalProperties":false,"nullable":true}},"required":["id","channel","label","state","revision","generation","selectedCount","requiredSecurity","optionalRegistration","optionalDelivery"],"additionalProperties":false}},"subscriptions":{"type":"array","items":{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention","billing.attention"]},"maxItems":6},"cadence":{"oneOf":[{"type":"string","enum":["immediate","daily"]},{"type":"object","properties":{"release.created":{"type":"string","enum":["immediate","daily"]},"project.activity":{"type":"string","enum":["immediate","daily"]},"integration.attention":{"type":"string","enum":["immediate","daily"]},"team.membership_changed":{"type":"string","enum":["immediate","daily"]},"team.integration_attention":{"type":"string","enum":["immediate","daily"]},"billing.attention":{"type":"string","enum":["immediate","daily"]}},"additionalProperties":false}]},"excludeOwnActivity":{"type":"boolean"},"reminders":{"type":"boolean"},"userId":{"type":"string"},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["destinationId","teamId","projectIds","kinds","cadence","excludeOwnActivity","reminders","userId","revision","generation","createdAt","updatedAt"],"additionalProperties":false},"description":"Complete own saved policies, including unavailable opaque scope IDs. No resource access is granted. Never a partial editable row."},"savedPolicies":{"type":"array","items":{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention","billing.attention"]},"maxItems":6},"cadence":{"oneOf":[{"type":"string","enum":["immediate","daily"]},{"type":"object","properties":{"release.created":{"type":"string","enum":["immediate","daily"]},"project.activity":{"type":"string","enum":["immediate","daily"]},"integration.attention":{"type":"string","enum":["immediate","daily"]},"team.membership_changed":{"type":"string","enum":["immediate","daily"]},"team.integration_attention":{"type":"string","enum":["immediate","daily"]},"billing.attention":{"type":"string","enum":["immediate","daily"]}},"additionalProperties":false}]},"excludeOwnActivity":{"type":"boolean"},"reminders":{"type":"boolean"},"userId":{"type":"string"},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["destinationId","teamId","projectIds","kinds","cadence","excludeOwnActivity","reminders","userId","revision","generation","createdAt","updatedAt"],"additionalProperties":false},"description":"Explicit complete own-policy capability. Same records as subscriptions; catalogue separately qualifies expansion."},"email":{"type":"object","properties":{"preferences":{"type":"object","properties":{"productEmails":{"type":"boolean"},"projectEmails":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["productEmails","projectEmails","revision"],"additionalProperties":false},"savedWatches":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"enabled":{"type":"boolean"},"generation":{"type":"integer","minimum":0},"blocked":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true}},"required":["projectId","enabled","generation","blocked"],"additionalProperties":false}},"watches":{"type":"array","items":{"type":"object","properties":{"projectId":{"type":"string"},"enabled":{"type":"boolean"},"generation":{"type":"integer","minimum":0},"blocked":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true}},"required":["projectId","enabled","generation","blocked"],"additionalProperties":false}},"deliveryBlock":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true},"requiredSecurity":{"type":"object","properties":{"enabled":{"type":"boolean","enum":[true]},"editable":{"type":"boolean","enum":[false]}},"required":["enabled","editable"],"additionalProperties":false},"requiredBilling":{"type":"object","properties":{"enabled":{"type":"boolean","enum":[true]},"editable":{"type":"boolean","enum":[false]}},"required":["enabled","editable"],"additionalProperties":false},"projectSummary":{"type":"object","properties":{"cadence":{"type":"string","enum":["daily"]},"excludeOwnActivity":{"type":"boolean","enum":[false]}},"required":["cadence","excludeOwnActivity"],"additionalProperties":false}},"required":["preferences","savedWatches","watches","deliveryBlock","requiredSecurity","requiredBilling","projectSummary"],"additionalProperties":false}},"required":["chatProviders","channels","subscriptions","savedPolicies","email"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/{notificationId}/target":{"get":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"getApiV1MeNotificationsNotificationIdTarget","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bindingGeneration","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Exact operation receipt. Cache-Control: no-store.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"state":{"type":"string","enum":["available"]},"target":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"]},{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"]},{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"]},{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"]},{"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"]}]}},"required":["state","target"]},{"type":"object","additionalProperties":false,"properties":{"state":{"type":"string","enum":["unavailable","expired","wrong_binding","no_target"]}},"required":["state"]}]}}}},"400":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"401":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"403":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"404":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"409":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"413":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"429":{"description":"Rate limited; Retry-After: 60 seconds.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}},"503":{"description":"Unavailable authority, proof, readiness or stale operation. No secret reflection.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"error":{"type":"string"},"code":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}},"required":["error","code","requestId"]}}}}}}},"/api/v1/me/notifications/catalogue":{"get":{"summary":"List optional notification kinds filtered by current membership role. Unqualified sources remain unavailable. Email project summaries use the existing daily watch and do not filter own edits; team integration selection covers accessible team-owned integrations.","tags":["Account"],"operationId":"getApiV1MeNotificationsCatalogue","parameters":[],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention","billing.attention"]},"teamId":{"type":"string"},"available":{"type":"boolean"}},"required":["kind","teamId","available"],"additionalProperties":false}},"emailActivity":{"type":"object","properties":{"policy":{"type":"string","enum":["legacy_watch"]},"cadence":{"type":"string","enum":["daily"]},"excludeOwnActivity":{"type":"boolean","enum":[false]}},"required":["policy","cadence","excludeOwnActivity"],"additionalProperties":false},"emailBilling":{"type":"object","properties":{"policy":{"type":"string","enum":["legacy_billing"]},"enabled":{"type":"boolean","enum":[true]},"editable":{"type":"boolean","enum":[false]}},"required":["policy","enabled","editable"],"additionalProperties":false}},"required":["kinds","emailActivity","emailBilling"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/channels/{channelId}":{"delete":{"summary":"Remove one own external destination with expected revision, cancel its work and stop future history admission. Existing history remains. Built-in email cannot be removed.","tags":["Account"],"operationId":"deleteApiV1MeNotificationsChannelsChannelId}","parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0}},"required":["revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","push","slack","teams"]},"label":{"type":"string","maxLength":320},"state":{"type":"string","enum":["active","paused","removed"]},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"selectedCount":{"type":"integer","minimum":0},"requiredSecurity":{"type":"boolean"}},"required":["id","channel","label","state","revision","generation","selectedCount","requiredSecurity"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/channels/{channelId}/disclosure":{"get":{"summary":"Read or explicitly approve the exact shared disclosure scope for one own chat destination and selected MDL team. Current owner/admin and expected revision required; does not select alerts.","tags":["Account"],"operationId":"getApiV1MeNotificationsChannelsChannelIdDisclosure","parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}},{"name":"teamId","in":"query","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"ownerUserId":{"type":"string"},"approverUserId":{"type":"string"},"approverRole":{"type":"string","enum":["owner","admin"]},"destinationGeneration":{"type":"integer","minimum":0},"authorityEpoch":{"type":"integer","minimum":0},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"active":{"type":"boolean"},"approvedAt":{"type":"string","format":"date-time"}},"required":["destinationId","teamId","projectIds","kinds","ownerUserId","approverUserId","approverRole","destinationGeneration","authorityEpoch","revision","generation","active","approvedAt"],"additionalProperties":false},{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"revision":{"type":"integer","minimum":0},"active":{"type":"boolean"}},"required":["destinationId","teamId","projectIds","kinds","revision","active"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Read or explicitly approve the exact shared disclosure scope for one own chat destination and selected MDL team. Current owner/admin and expected revision required; does not select alerts.","tags":["Account"],"operationId":"postApiV1MeNotificationsChannelsChannelIdDisclosure","parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"revision":{"type":"integer","minimum":0}},"required":["teamId","projectIds","kinds","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"ownerUserId":{"type":"string"},"approverUserId":{"type":"string"},"approverRole":{"type":"string","enum":["owner","admin"]},"destinationGeneration":{"type":"integer","minimum":0},"authorityEpoch":{"type":"integer","minimum":0},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"active":{"type":"boolean"},"approvedAt":{"type":"string","format":"date-time"}},"required":["destinationId","teamId","projectIds","kinds","ownerUserId","approverUserId","approverRole","destinationGeneration","authorityEpoch","revision","generation","active","approvedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/channels/{channelId}/pause":{"post":{"summary":"Pause one own external destination using expected revision; advance cancellation generation. Built-in email cannot be paused.","tags":["Account"],"operationId":"postApiV1MeNotificationsChannelsChannelIdPause","parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0}},"required":["revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","push","slack","teams"]},"label":{"type":"string","maxLength":320},"state":{"type":"string","enum":["active","paused","removed"]},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"selectedCount":{"type":"integer","minimum":0},"requiredSecurity":{"type":"boolean"}},"required":["id","channel","label","state","revision","generation","selectedCount","requiredSecurity"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/channels/{channelId}/resume":{"post":{"summary":"Resume one own qualified external destination using expected revision and current registration readiness. Cancelled old generations never replay. Built-in email has no whole-channel resume.","tags":["Account"],"operationId":"postApiV1MeNotificationsChannelsChannelIdResume","parameters":[{"name":"channelId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0}},"required":["revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","push","slack","teams"]},"label":{"type":"string","maxLength":320},"state":{"type":"string","enum":["active","paused","removed"]},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"selectedCount":{"type":"integer","minimum":0},"requiredSecurity":{"type":"boolean"}},"required":["id","channel","label","state","revision","generation","selectedCount","requiredSecurity"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/chat/setups":{"post":{"summary":"Start an expiring account-bound Slack or Teams connection for one explicit MDL team. Current owner/admin required; optional exact disclosure scope may be empty. Transport setup never selects notification types.","tags":["Account"],"operationId":"postApiV1MeNotificationsChatSetups","parameters":[],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["slack","teams"]},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"expectedProviderId":{"type":"string","nullable":true},"reconnectId":{"type":"string"},"revision":{"type":"integer","minimum":0}},"required":["provider","teamId","projectIds","kinds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["slack","teams"]},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"expiresAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","exchanging","verified","uncertain","cancelled","unavailable","complete","expired"]},"unavailableReason":{"type":"string","enum":["teams_installation_context_unverified","teams_identity_unavailable"],"nullable":true},"destinationId":{"type":"string","nullable":true},"identity":{"type":"object","properties":{"providerId":{"type":"string"},"providerLabel":{"type":"string"},"channelId":{"type":"string"},"channelLabel":{"type":"string"},"appId":{"type":"string"},"teamId":{"type":"string","nullable":true},"verifiedAt":{"type":"string","format":"date-time","nullable":true}},"required":["providerId","providerLabel","channelId","channelLabel","appId","teamId","verifiedAt"],"additionalProperties":false,"nullable":true},"authorizationUrl":{"type":"string"},"setupCode":{"type":"string"},"requiresAuthenticatedFinish":{"type":"boolean","enum":[true]}},"required":["id","provider","teamId","projectIds","kinds","expiresAt","status","unavailableReason","destinationId","identity","authorizationUrl","requiresAuthenticatedFinish"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/chat/setups/{setupId}":{"get":{"summary":"Read own sanitized setup status and verified provider identity. A failed read is not a completed connection.","tags":["Account"],"operationId":"getApiV1MeNotificationsChatSetupsSetupId}","parameters":[{"name":"setupId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["slack","teams"]},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention"]},"maxItems":5},"expiresAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["pending","exchanging","verified","uncertain","cancelled","unavailable","complete","expired"]},"unavailableReason":{"type":"string","enum":["teams_installation_context_unverified","teams_identity_unavailable"],"nullable":true},"destinationId":{"type":"string","nullable":true},"identity":{"type":"object","properties":{"providerId":{"type":"string"},"providerLabel":{"type":"string"},"channelId":{"type":"string"},"channelLabel":{"type":"string"},"appId":{"type":"string"},"teamId":{"type":"string","nullable":true},"verifiedAt":{"type":"string","format":"date-time","nullable":true}},"required":["providerId","providerLabel","channelId","channelLabel","appId","teamId","verifiedAt"],"additionalProperties":false,"nullable":true}},"required":["id","provider","teamId","projectIds","kinds","expiresAt","status","unavailableReason","destinationId","identity"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/chat/setups/{setupId}/cancel":{"post":{"summary":"Cancel own incomplete setup and erase its encrypted pending credential. Does not uninstall the provider app.","tags":["Account"],"operationId":"postApiV1MeNotificationsChatSetupsSetupIdCancel","parameters":[{"name":"setupId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["cancelled"]}},"required":["status"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/chat/setups/{setupId}/finish":{"post":{"summary":"Explicitly confirm own verified provider target and shown disclosure scope under current first-party sign-in and unchanged team authority. Atomic completion starts new destinations with zero subscriptions; reconnect retains selections and pause.","tags":["Account"],"operationId":"postApiV1MeNotificationsChatSetupsSetupIdFinish","parameters":[{"name":"setupId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"destinationId":{"type":"string"},"channel":{"type":"object","properties":{"id":{"type":"string"},"channel":{"type":"string","enum":["email","push","slack","teams"]},"label":{"type":"string","maxLength":320},"state":{"type":"string","enum":["active","paused","removed"]},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"selectedCount":{"type":"integer","minimum":0},"requiredSecurity":{"type":"boolean"}},"required":["id","channel","label","state","revision","generation","selectedCount","requiredSecurity"],"additionalProperties":false}},"required":["destinationId","channel"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/email/preferences":{"get":{"summary":"Read the same authoritative legacy productEmails/projectEmails consent and revision through a first-party personal notification session. Required mail metadata remains read-only.","tags":["Account"],"operationId":"getApiV1MeNotificationsEmailPreferences","parameters":[],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"productEmails":{"type":"boolean"},"projectEmails":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["productEmails","projectEmails","revision"],"additionalProperties":false},"deliveryBlock":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true}},"required":["preferences","deliveryBlock"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Save strict legacy productEmails/projectEmails booleans and expected revision. Preserves existing cancellation, unsubscribe and re-enrollment semantics; required mail is unaffected.","tags":["Account"],"operationId":"putApiV1MeNotificationsEmailPreferences","parameters":[],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productEmails":{"type":"boolean"},"projectEmails":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["productEmails","projectEmails","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","properties":{"productEmails":{"type":"boolean"},"projectEmails":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["productEmails","projectEmails","revision"],"additionalProperties":false},"deliveryBlock":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true}},"required":["preferences","deliveryBlock"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/email/projects/{projectId}/watch":{"get":{"summary":"Read own existing legacy daily project-summary watch and generation after current membership checks. No consent migration or new sender.","tags":["Account"],"operationId":"getApiV1MeNotificationsEmailProjectsProjectIdWatch","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"generation":{"type":"integer","minimum":0},"blocked":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true},"preferencesUrl":{"type":"string"}},"required":["enabled","generation","blocked"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Set own existing legacy daily project-summary enabled boolean and expected generation. Same readiness, suppression, preferences and cancellation rules as the original project email-watch route.","tags":["Account"],"operationId":"putApiV1MeNotificationsEmailProjectsProjectIdWatch","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"generation":{"type":"integer","minimum":0}},"required":["enabled","generation"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"generation":{"type":"integer","minimum":0},"blocked":{"type":"string","enum":["preferences","suppressed","unavailable"],"nullable":true},"preferencesUrl":{"type":"string"}},"required":["enabled","generation","blocked"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/me/notifications/history":{"get":{"summary":"Read one logical account entry per notification or incident regardless of channel fan-out. Current authority is rechecked. History lasts 90 days independent of attempts. Filters: kind, teamId, projectId, from, to, cursor and limit 1..100.","tags":["Account"],"operationId":"getApiV1MeNotificationsHistory","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"type":"string"}},{"name":"teamId","in":"query","schema":{"type":"string"}},{"name":"projectId","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"presentation":{"type":"object","properties":{"title":{"type":"string"},"scope":{"type":"string"},"summary":{"type":"string"},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]}},"required":["title","scope","summary","target"],"additionalProperties":false,"nullable":true},"incident":{"type":"object","properties":{"lastMeaningfulAt":{"type":"integer","minimum":0},"episodeId":{"type":"string"},"revision":{"type":"integer","minimum":0},"state":{"type":"string","enum":["pending","open","resolved"]},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"severity":{"type":"string","enum":["warning","critical"]},"count":{"type":"integer","minimum":0},"firstObservedAt":{"type":"integer","minimum":0},"lastObservedAt":{"type":"integer","minimum":0},"openedAt":{"type":"integer","minimum":0,"nullable":true},"resolvedAt":{"type":"integer","minimum":0,"nullable":true},"timeline":{"type":"array","items":{"type":"object","properties":{"phase":{"type":"string","enum":["opening","recovery","reopened"]},"at":{"type":"integer","minimum":0}},"required":["phase","at"],"additionalProperties":false},"maxItems":100}},"required":["lastMeaningfulAt","episodeId","revision","state","reason","severity","count","firstObservedAt","lastObservedAt","openedAt","resolvedAt","timeline"],"additionalProperties":false,"nullable":true},"id":{"type":"string"},"userId":{"type":"string"},"logicalId":{"type":"string"},"event":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["release.created"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"publicationId":{"type":"string"},"version":{"type":"string"}},"required":["publicationId","version"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["project.activity"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"sequenceStart":{"type":"integer","minimum":0},"sequenceEnd":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["sequenceStart","sequenceEnd","created","updated","deleted"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["integration.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"oneOf":[{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false},{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure"]},"severity":{"type":"string","enum":["warning","critical"]},"automaticPause":{"type":"boolean","enum":[true]}},"required":["integrationType","integrationId","resultId","reason","state","severity","automaticPause"],"additionalProperties":false}]}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.membership_changed"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"membershipId":{"type":"string"},"affectedUserId":{"type":"string"},"action":{"type":"string","enum":["invited","joined","removed","role_changed"]},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["membershipId","affectedUserId","action","role"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.integration_attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["billing.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"billingEventId":{"type":"string"},"status":{"type":"string","enum":["past_due","paused","unpaid","active","incomplete","incomplete_expired"]},"reason":{"type":"string","enum":["payment_failed","payment_recovered","grace_expiring","converted_to_free"]},"effectiveAt":{"type":"string","format":"date-time"}},"required":["billingEventId","status","reason","effectiveAt"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"nullable":true},"security":{"type":"object","properties":{"sourceId":{"type":"string"},"subjectUserId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"sourceKind":{"type":"string","enum":["password_changed","password_reset","email_changed","passkey_added","passkey_removed"]},"mandatory":{"type":"boolean","enum":[true]},"channel":{"type":"string","enum":["email"]}},"required":["sourceId","subjectUserId","occurredAt","sourceKind","mandatory","channel"],"additionalProperties":false,"nullable":true},"readAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["presentation","incident","id","userId","logicalId","event","security","readAt","createdAt","updatedAt","expiresAt"],"additionalProperties":false}},"nextCursor":{"type":"string","nullable":true}},"required":["entries","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/history/{notificationId}":{"get":{"summary":"Read own logical notification history after current authority and 90-day retention checks. Missing or inaccessible entries return 404; unavailable targets are neutral.","tags":["Account"],"operationId":"getApiV1MeNotificationsHistoryNotificationId}","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"presentation":{"type":"object","properties":{"title":{"type":"string"},"scope":{"type":"string"},"summary":{"type":"string"},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]}},"required":["title","scope","summary","target"],"additionalProperties":false,"nullable":true},"incident":{"type":"object","properties":{"lastMeaningfulAt":{"type":"integer","minimum":0},"episodeId":{"type":"string"},"revision":{"type":"integer","minimum":0},"state":{"type":"string","enum":["pending","open","resolved"]},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"severity":{"type":"string","enum":["warning","critical"]},"count":{"type":"integer","minimum":0},"firstObservedAt":{"type":"integer","minimum":0},"lastObservedAt":{"type":"integer","minimum":0},"openedAt":{"type":"integer","minimum":0,"nullable":true},"resolvedAt":{"type":"integer","minimum":0,"nullable":true},"timeline":{"type":"array","items":{"type":"object","properties":{"phase":{"type":"string","enum":["opening","recovery","reopened"]},"at":{"type":"integer","minimum":0}},"required":["phase","at"],"additionalProperties":false},"maxItems":100}},"required":["lastMeaningfulAt","episodeId","revision","state","reason","severity","count","firstObservedAt","lastObservedAt","openedAt","resolvedAt","timeline"],"additionalProperties":false,"nullable":true},"id":{"type":"string"},"userId":{"type":"string"},"logicalId":{"type":"string"},"event":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["release.created"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"publicationId":{"type":"string"},"version":{"type":"string"}},"required":["publicationId","version"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["project.activity"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"sequenceStart":{"type":"integer","minimum":0},"sequenceEnd":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["sequenceStart","sequenceEnd","created","updated","deleted"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["integration.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"oneOf":[{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false},{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure"]},"severity":{"type":"string","enum":["warning","critical"]},"automaticPause":{"type":"boolean","enum":[true]}},"required":["integrationType","integrationId","resultId","reason","state","severity","automaticPause"],"additionalProperties":false}]}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.membership_changed"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"membershipId":{"type":"string"},"affectedUserId":{"type":"string"},"action":{"type":"string","enum":["invited","joined","removed","role_changed"]},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["membershipId","affectedUserId","action","role"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.integration_attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["billing.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"billingEventId":{"type":"string"},"status":{"type":"string","enum":["past_due","paused","unpaid","active","incomplete","incomplete_expired"]},"reason":{"type":"string","enum":["payment_failed","payment_recovered","grace_expiring","converted_to_free"]},"effectiveAt":{"type":"string","format":"date-time"}},"required":["billingEventId","status","reason","effectiveAt"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"nullable":true},"security":{"type":"object","properties":{"sourceId":{"type":"string"},"subjectUserId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"sourceKind":{"type":"string","enum":["password_changed","password_reset","email_changed","passkey_added","passkey_removed"]},"mandatory":{"type":"boolean","enum":[true]},"channel":{"type":"string","enum":["email"]}},"required":["sourceId","subjectUserId","occurredAt","sourceKind","mandatory","channel"],"additionalProperties":false,"nullable":true},"readAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["presentation","incident","id","userId","logicalId","event","security","readAt","createdAt","updatedAt","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/history/{notificationId}/read":{"post":{"summary":"Mark an own authorized history entry read. Empty JSON body. Idempotent; never resolves an incident or acknowledges provider delivery.","tags":["Account"],"operationId":"postApiV1MeNotificationsHistoryNotificationIdRead","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"presentation":{"type":"object","properties":{"title":{"type":"string"},"scope":{"type":"string"},"summary":{"type":"string"},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]}},"required":["title","scope","summary","target"],"additionalProperties":false,"nullable":true},"incident":{"type":"object","properties":{"lastMeaningfulAt":{"type":"integer","minimum":0},"episodeId":{"type":"string"},"revision":{"type":"integer","minimum":0},"state":{"type":"string","enum":["pending","open","resolved"]},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"severity":{"type":"string","enum":["warning","critical"]},"count":{"type":"integer","minimum":0},"firstObservedAt":{"type":"integer","minimum":0},"lastObservedAt":{"type":"integer","minimum":0},"openedAt":{"type":"integer","minimum":0,"nullable":true},"resolvedAt":{"type":"integer","minimum":0,"nullable":true},"timeline":{"type":"array","items":{"type":"object","properties":{"phase":{"type":"string","enum":["opening","recovery","reopened"]},"at":{"type":"integer","minimum":0}},"required":["phase","at"],"additionalProperties":false},"maxItems":100}},"required":["lastMeaningfulAt","episodeId","revision","state","reason","severity","count","firstObservedAt","lastObservedAt","openedAt","resolvedAt","timeline"],"additionalProperties":false,"nullable":true},"id":{"type":"string"},"userId":{"type":"string"},"logicalId":{"type":"string"},"event":{"oneOf":[{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["release.created"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"publicationId":{"type":"string"},"version":{"type":"string"}},"required":["publicationId","version"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["project.activity"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"sequenceStart":{"type":"integer","minimum":0},"sequenceEnd":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["sequenceStart","sequenceEnd","created","updated","deleted"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["integration.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"oneOf":[{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false},{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure"]},"severity":{"type":"string","enum":["warning","critical"]},"automaticPause":{"type":"boolean","enum":[true]}},"required":["integrationType","integrationId","resultId","reason","state","severity","automaticPause"],"additionalProperties":false}]}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.membership_changed"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"membershipId":{"type":"string"},"affectedUserId":{"type":"string"},"action":{"type":"string","enum":["invited","joined","removed","role_changed"]},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["membershipId","affectedUserId","action","role"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["team.integration_attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"},"resultId":{"type":"string"},"reason":{"type":"string","enum":["transient","authentication","configuration","paused","stale"]},"state":{"type":"string","enum":["failure","success","reconnected"]},"severity":{"type":"string","enum":["warning","critical"]}},"required":["integrationType","integrationId","resultId","reason","state","severity"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"integer","enum":[1]},"sourceId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["billing.attention"]},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"subjectUserId":{"type":"string","nullable":true},"actorUserId":{"type":"string","nullable":true},"systemSource":{"type":"string","enum":["publication","project-change","repo-sync","endpoint-refresh","membership","billing"],"nullable":true},"visibility":{"type":"string","enum":["project","team","private","security"]},"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]},"args":{"type":"object","properties":{"billingEventId":{"type":"string"},"status":{"type":"string","enum":["past_due","paused","unpaid","active","incomplete","incomplete_expired"]},"reason":{"type":"string","enum":["payment_failed","payment_recovered","grace_expiring","converted_to_free"]},"effectiveAt":{"type":"string","format":"date-time"}},"required":["billingEventId","status","reason","effectiveAt"],"additionalProperties":false}},"required":["schemaVersion","sourceId","occurredAt","kind","teamId","projectId","subjectUserId","actorUserId","systemSource","visibility","target","args"],"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"nullable":true},"security":{"type":"object","properties":{"sourceId":{"type":"string"},"subjectUserId":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"},"sourceKind":{"type":"string","enum":["password_changed","password_reset","email_changed","passkey_added","passkey_removed"]},"mandatory":{"type":"boolean","enum":[true]},"channel":{"type":"string","enum":["email"]}},"required":["sourceId","subjectUserId","occurredAt","sourceKind","mandatory","channel"],"additionalProperties":false,"nullable":true},"readAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["presentation","incident","id","userId","logicalId","event","security","readAt","createdAt","updatedAt","expiresAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/history/{notificationId}/target":{"get":{"summary":"Resolve an own history entry to a typed current-authority target or null. Uses 90-day history lifetime, separate from 24-hour mobile push tap receipts.","tags":["Account"],"operationId":"getApiV1MeNotificationsHistoryNotificationIdTarget","parameters":[{"name":"notificationId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"notifications:manage","responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"target":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"teamId":{"type":"string"},"projectId":{"type":"string"}},"required":["kind","teamId","projectId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["release"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"publicationId":{"type":"string"}},"required":["kind","teamId","projectId","publicationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["document"]},"teamId":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["kind","teamId","projectId","documentId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["integration"]},"teamId":{"type":"string"},"integrationType":{"type":"string","enum":["repo","endpoint"]},"integrationId":{"type":"string"}},"required":["kind","teamId","integrationType","integrationId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["team","billing"]},"teamId":{"type":"string"}},"required":["kind","teamId"],"additionalProperties":false}]}},"required":["target"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/me/notifications/subscriptions":{"put":{"summary":"Save own strict destinationId, teamId, projectIds, kinds, cadence, excludeOwnActivity, reminders and expected revision. No userId accepted. Stale saves conflict, no-ops retain revision; unavailable kinds cannot be enabled. New project.activity email is refused; use the legacy watch.","tags":["Account"],"operationId":"putApiV1MeNotificationsSubscriptions","parameters":[],"x-required-scope":"notifications:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention","billing.attention"]},"maxItems":6},"cadence":{"oneOf":[{"type":"string","enum":["immediate","daily"]},{"type":"object","properties":{"release.created":{"type":"string","enum":["immediate","daily"]},"project.activity":{"type":"string","enum":["immediate","daily"]},"integration.attention":{"type":"string","enum":["immediate","daily"]},"team.membership_changed":{"type":"string","enum":["immediate","daily"]},"team.integration_attention":{"type":"string","enum":["immediate","daily"]},"billing.attention":{"type":"string","enum":["immediate","daily"]}},"additionalProperties":false}]},"excludeOwnActivity":{"type":"boolean"},"reminders":{"type":"boolean"},"revision":{"type":"integer","minimum":0}},"required":["destinationId","teamId","projectIds","kinds","cadence","excludeOwnActivity","reminders","revision"],"additionalProperties":false}}}},"responses":{"200":{"description":"Own authorized notification data; no provider handles or secrets.","content":{"application/json":{"schema":{"type":"object","properties":{"destinationId":{"type":"string"},"teamId":{"type":"string"},"projectIds":{"type":"array","items":{"type":"string"},"maxItems":100},"kinds":{"type":"array","items":{"type":"string","enum":["release.created","project.activity","integration.attention","team.membership_changed","team.integration_attention","billing.attention"]},"maxItems":6},"cadence":{"oneOf":[{"type":"string","enum":["immediate","daily"]},{"type":"object","properties":{"release.created":{"type":"string","enum":["immediate","daily"]},"project.activity":{"type":"string","enum":["immediate","daily"]},"integration.attention":{"type":"string","enum":["immediate","daily"]},"team.membership_changed":{"type":"string","enum":["immediate","daily"]},"team.integration_attention":{"type":"string","enum":["immediate","daily"]},"billing.attention":{"type":"string","enum":["immediate","daily"]}},"additionalProperties":false}]},"excludeOwnActivity":{"type":"boolean"},"reminders":{"type":"boolean"},"userId":{"type":"string"},"revision":{"type":"integer","minimum":0},"generation":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["destinationId","teamId","projectIds","kinds","cadence","excludeOwnActivity","reminders","userId","revision","generation","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Revision or generation changed. Reload current state before saving."}}}},"/api/v1/notification-devices/revoke":{"post":{"summary":"Native installation proof and generation-fenced notification lifecycle. See mobile push contract.","tags":["Account"],"operationId":"postApiV1NotificationDevicesRevoke","parameters":[],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"operationId":{"type":"string","format":"uuid"},"installationId":{"type":"string","format":"uuid"},"bindingGeneration":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[A-Za-z0-9_-]+$"},"cleanupToken":{"type":"string","minLength":43,"maxLength":43,"writeOnly":true}},"required":["operationId","installationId","bindingGeneration","cleanupToken"]}}}},"responses":{"202":{"description":"Generic empty response, including invalid/stale/unknown capability. Cache-Control: no-store."},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/notifications/unsubscribe":{"get":{"summary":"Inert no-store confirmation for an expiring, generation-scoped optional notification email capability.","tags":["Account"],"operationId":"getApiV1NotificationsUnsubscribe","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}},"post":{"summary":"Disable only the optional email kinds and policy generations captured by this capability. Never changes required mail or legacy product and project watches.","tags":["Account"],"operationId":"postApiV1NotificationsUnsubscribe","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/oauth/clients":{"get":{"summary":"List the OAuth clients this account owns. A credential bound to a team lists only the clients bound to that team.","tags":["Credentials"],"operationId":"getApiV1OauthClients","parameters":[],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"Owned clients and their authorization ceilings.","content":{"application/json":{"schema":{"type":"object","required":["clients"],"properties":{"clients":{"type":"array","items":{"type":"object","required":["id","name","grantTypes","scopes","teamId","projectId"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"grantTypes":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"redirectUris":{"type":"array","items":{"type":"string"}},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true,"description":"Immutable project authorization ceiling, or null for an existing unrestricted/team-only credential."},"connectionType":{"type":"string","enum":["agent"],"description":"Present only for a Connected Agent: a named, project-bound client on the client_credentials grant. A label for attribution and display; it grants no permission and does not change any ceiling. Absent for every ordinary and registered client."},"accessMode":{"type":"string","enum":["read_only","read_write"],"description":"Present on explicitly two-mode Connected Agents. Existing agents retain their original stored scopes and do not acquire a mode automatically."},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true}}}}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Provision an OAuth client. The secret is returned exactly once. Its scopes must be ones the calling credential holds (`git:read` counts as held by anyone with `documents:read`). A client with the `authorization_code` grant signs other people in, so it may not hold `access-keys:manage`, needs at least one redirect URI, and each must be https or a loopback http address with no fragment, wildcard or credentials (at most 10, 2048 characters each). An optional teamId BINDS the credential to one team: it is then refused everywhere else, including on account routes that name no team. An optional projectId restricts a personal client_credentials credential to one accessible active project. If teamId is also supplied, it must match that project. Only documents:read, documents:write, projects:read and releases:read are allowed for project credentials; account/team administration, new projects, further credentials, subscriptions, account/team exports and git cloning are refused. Project restriction on shared authorization_code registrations is refused: each user chooses their own restriction during consent. Existing credentials remain unchanged; changing a boundary requires explicit new authorization. A person holds at most 20 live `git:read` clients per team binding; past that the call is refused 409 with `details.reason: \"git-credential-limit\"` and the ceiling on `details.limit`, and revoking one frees its place. Provisioning a Connected Agent can return 429 with details.reason=workspace-quota if its workspace onboarding task would exceed capacity.","tags":["Credentials"],"operationId":"postApiV1OauthClients","parameters":[],"x-required-scope":"access-keys:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"grantTypes":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"},"description":"For ordinary applications only; omit for Connected Agents."},"redirectUris":{"type":"array","items":{"type":"string"}},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true,"minLength":1,"description":"Restrict client_credentials to one accessible active project. When teamId is supplied it must match. Authorization-code registrations use per-user consent instead. Project credentials permit only document read/write, project read and release read scopes."},"connectionType":{"type":"string","enum":["application","agent"],"description":"Optional; defaults to application. agent requires projectId, accessMode, the client_credentials grant only, and no redirect URIs or custom scopes."},"accessMode":{"type":"string","enum":["read_only","read_write"],"description":"Required for a Connected Agent and absent otherwise. Read only grants document and project metadata reads. Read and write also grants document writes. Both are bound to the selected project and exclude sharing, publishing, and administration."},"description":{"type":"string","nullable":true}}}}}},"responses":{"201":{"description":"Client created; save the secret because it is returned only once.","content":{"application/json":{"schema":{"type":"object","required":["client","secret"],"properties":{"client":{"type":"object","required":["id","name","grantTypes","scopes","teamId","projectId"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"grantTypes":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"redirectUris":{"type":"array","items":{"type":"string"}},"teamId":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true,"description":"Immutable project authorization ceiling, or null for an existing unrestricted/team-only credential."},"connectionType":{"type":"string","enum":["agent"],"description":"Present only for a Connected Agent: a named, project-bound client on the client_credentials grant. A label for attribution and display; it grants no permission and does not change any ceiling. Absent for every ordinary and registered client."},"accessMode":{"type":"string","enum":["read_only","read_write"],"description":"Present on explicitly two-mode Connected Agents. Existing agents retain their original stored scopes and do not acquire a mode automatically."},"description":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time","nullable":true},"revokedAt":{"type":"string","format":"date-time","nullable":true}}},"secret":{"type":"string"}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/oauth/clients/{clientId}/revoke":{"post":{"summary":"Revoke an OAuth client immediately.","tags":["Credentials"],"operationId":"postApiV1OauthClientsClientIdRevoke","parameters":[{"name":"clientId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/openapi.json":{"get":{"summary":"This document.","tags":["Platform"],"operationId":"getApiV1OpenapiJson","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}":{"patch":{"summary":"Update a project’s name, description or formatting settings.","tags":["Projects"],"operationId":"patchApiV1ProjectsProjectId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","maxLength":120},"settings":{"type":"object"},"timezone":{"type":"string"},"locale":{"type":"string"},"slug":{"type":"string","maxLength":40},"substitutionEnabled":{"type":"boolean"},"templateId":{"type":"string","nullable":true},"sensitive":{"type":"boolean","description":"Independent project sensitivity marker. When team blocking is enabled, suspends existing public links and public site without revocation. Omission preserves current value."}}}}}},"responses":{"200":{"description":"Current settings.","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"sensitive":{"type":"boolean"}},"required":["id","sensitive"]}},"required":["project"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/access":{"get":{"summary":"Read internal project access. Effective member details require members.view; eligible teammates are returned to access managers. Private project access is required.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAccess","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Current internal access. Shared links and published sites retain their existing settings.","content":{"application/json":{"schema":{"type":"object","properties":{"accessMode":{"type":"string","enum":["open","private"]},"accessRevision":{"type":"integer","minimum":1},"createdBy":{"type":"string","nullable":true},"canManage":{"type":"boolean"},"canSeeMembers":{"type":"boolean","description":"Effective member details require the existing members.view permission."},"accessRevoked":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"automatic":{"type":"boolean"},"creator":{"type":"boolean"},"explicit":{"type":"boolean"}},"required":["userId","name","email","role"]}},"eligible":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"automatic":{"type":"boolean"},"creator":{"type":"boolean"},"explicit":{"type":"boolean"}},"required":["userId","name","email","role"]}}},"required":["accessMode","accessRevision","canManage","canSeeMembers","members","eligible"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Change Open/Private access or add/remove an existing team member using expectedRevision. Creator with editing permission and team owners/admins may manage access. Existing external shares and sites are preserved.","tags":["Projects"],"operationId":"putApiV1ProjectsProjectIdAccess","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expectedRevision":{"type":"integer","minimum":1},"accessMode":{"type":"string","enum":["open","private"]},"addUserId":{"type":"string"},"removeUserId":{"type":"string"}},"required":["expectedRevision"],"oneOf":[{"required":["accessMode"]},{"required":["addUserId"]},{"required":["removeUserId"]}]}}}},"responses":{"200":{"description":"Current internal access. Shared links and published sites retain their existing settings.","content":{"application/json":{"schema":{"type":"object","properties":{"accessMode":{"type":"string","enum":["open","private"]},"accessRevision":{"type":"integer","minimum":1},"createdBy":{"type":"string","nullable":true},"canManage":{"type":"boolean"},"canSeeMembers":{"type":"boolean","description":"Effective member details require the existing members.view permission."},"accessRevoked":{"type":"boolean"},"members":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"automatic":{"type":"boolean"},"creator":{"type":"boolean"},"explicit":{"type":"boolean"}},"required":["userId","name","email","role"]}},"eligible":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"automatic":{"type":"boolean"},"creator":{"type":"boolean"},"explicit":{"type":"boolean"}},"required":["userId","name","email","role"]}}},"required":["accessMode","accessRevision","canManage","canSeeMembers","members","eligible"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace":{"get":{"summary":"Read the ready workspace’s current, authorized governance pointers. Requires a signed-in person using the web app or registered native app.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspace","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/context-updates":{"get":{"summary":"Read authorized workspace activity. Omit since for the most recent five minutes or pass the prior server asOf. If complete is false, more updates remain after that cutoff. Returns a stable task assignee or null. Available to signed-in people using the web or registered native app. On native, coverage excludes ordinary comments and secret change metadata. No pagination or secret values.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceContextUpdates","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/recent-files":{"get":{"summary":"Read at most ten authorized active file labels ordered by latest committed document-version time. First-party console only; protected unavailability is explicit and no source bytes are read.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRecentFiles","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements":{"get":{"summary":"List active-workspace requirements by stable ID or title and description keyword with bounded keyset pagination and an optional coverage, reapproval, blocked, or waiting view. Reports current feature settings. Requires a signed-in web console user and current project read access.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a Draft requirement with structured content and an idempotency key. Requires current project write access through the web console. A retained requirement cap returns 429 with details.reason=workspace-quota.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceRequirements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/{requirementId}":{"get":{"summary":"Read a requirement with separate approval, outcome verification, task progress, and bounded history. Coverage includes same-project task links and current approved peer coverage.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirementsRequirementId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requirementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/{requirementId}/actions":{"post":{"summary":"Edit, comment, or link a same-project task with expectedRevision and an idempotency key. Workspace coordinators explicitly approve, verify, withdraw or archive. Task status is unchanged. Approval that increases active usage is subject to the active requirement cap (429, details.reason=workspace-quota).","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceRequirementsRequirementIdActions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requirementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/{requirementId}/task-options":{"get":{"summary":"Search titles of eligible unlinked same-workspace tasks. Returns only scoped ID, title and status for web-console writers.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirementsRequirementIdTaskOptions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"requirementId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/export/{format}":{"get":{"summary":"Download a private Markdown or PDF summary of current selected or all requirements with optional group, priority and effort.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirementsExportFormat}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["md","pdf"]}},{"name":"selection","in":"query","required":true,"schema":{"type":"string","enum":["all","selected"]}},{"name":"id","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"},"maxItems":100},"description":"Required for selected scope. Repeat for each requirement."},{"name":"include","in":"query","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["group","priority","effort"]}},"description":"Optional attributes to include."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Private requirements summary attachment","content":{"text/markdown":{"schema":{"type":"string","format":"binary"}},"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/import/confirm":{"post":{"summary":"Atomically import selected reviewed ReqIF objects as Draft requirements. Requires an unchanged source and an idempotency key; direct uploads also require the signed review proof and exact source bytes. Never synchronizes or creates tasks.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceRequirementsImportConfirm","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/import/preview":{"post":{"summary":"Review a bounded mapping from a saved, readable or directly uploaded ReqIF XML source to candidate Draft requirements. Does not write.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceRequirementsImportPreview","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/import/sources":{"get":{"summary":"List eligible saved ReqIF sources in this Agent Workspace. Requires authenticated web-console write access.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirementsImportSources","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/requirements/overview":{"get":{"summary":"Count independent current requirement coverage, reapproval, blocked and waiting signals for the exact ready workspace.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceRequirementsOverview","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/secrets":{"get":{"summary":"List workspace secret names and optional non-sensitive descriptions, or poll created, updated and deleted changes. The poll returns sequence, name and action only. Neither view returns values. First-party web console only.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceSecrets","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"poll","in":"query","schema":{"type":"string","enum":["1"]},"description":"Set to 1 for metadata-only changes. Omit all query parameters to list names and optional descriptions."},{"name":"after","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"default":0},"description":"Only with poll=1. Start at 0 or use the last nextAfter for this same workspace."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"description":"Only with poll=1. Continue while hasMore. Keep nextAfter even when no changes are returned."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/secrets/{secretId}":{"delete":{"summary":"Delete a named workspace secret without returning its value. First-party web console writers only.","tags":["Projects"],"operationId":"deleteApiV1ProjectsProjectIdAgentWorkspaceSecretsSecretId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"secretId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"Retrieve one secret value by its exact name; this is the only secrets endpoint returning a value. Use it only in the authorized operation. First-party web console only.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceSecretsSecretId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"secretId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Create or replace a named workspace secret without returning its value. First-party web console writers only.","tags":["Projects"],"operationId":"putApiV1ProjectsProjectIdAgentWorkspaceSecretsSecretId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"secretId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/settings":{"get":{"summary":"Read the current settings revision and authorized governance document labels for a ready Agent Workspace. Project manager, first-party console only.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceSettings","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Set or clear selected workspace governance roles by current same-project document ID or null. Supply expectedRevision; omitted roles are preserved. Project manager, first-party console; requires documents:read and documents:write.","tags":["Projects"],"operationId":"patchApiV1ProjectsProjectIdAgentWorkspaceSettings","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/task-assignees":{"get":{"summary":"Find eligible people and Connected Agents in the current workspace. The web app searches with q. The registered native app pages minimal IDs and labels using nextAfter as after until hasMore is false. Requires a signed-in person with project write access. No grants are changed.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTaskAssignees","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/task-comments":{"get":{"summary":"Read only workspace task discussion with cursor, intent and inclusive since/exclusive until filters, or poll=1 and a commit-order checkpoint. Requires a signed-in web or registered native app session and current project access.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTaskComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/task-status":{"get":{"summary":"Read current workspace task counts, seven UTC days of recorded acceptances, and bounded blocked/review tasks and recent outcomes. Available to signed-in people using the web or registered native app. Outcome details follow current team-admin or self audit visibility.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTaskStatus","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/tasks":{"get":{"summary":"List bounded top-level workspace task summaries (use hierarchy=flat to include subtasks as separate rows), with open-status filter and live keyset paging, or poll latest snapshots (including Done) with since/until and a window cursor. Not an audit stream. Requires a signed-in person using the web app or registered native app and current project read access.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTasks","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a structured workspace task with an idempotency key and server-attributed actor. Current project write access required. A workspace or parent-task capacity refusal returns 429 with details.reason=workspace-quota. Drafts count toward retained capacity.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceTasks","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/tasks/{taskId}":{"get":{"summary":"Read by project-scoped TASK-/STASK- display identifier or canonical task UUID, including ordered children and parent context, with current project read access using a signed-in web or registered native app session.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTasksTaskId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/tasks/{taskId}/comments":{"get":{"summary":"Read only workspace task discussion with cursor, intent and inclusive since/exclusive until filters, or poll=1 and a commit-order checkpoint. Requires a signed-in web or registered native app session and current project access.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdAgentWorkspaceTasksTaskIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Post an attributed Update, Question or Issue with optional top-level reply and stable retry key. Requires a signed-in web or registered native app session with current project write access.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceTasksTaskIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/agent-workspace/tasks/{taskId}/transitions":{"post":{"summary":"Apply an authorized task transition using expected revision and idempotency key; review requires current assigner or coordinator. Transitions that increase active usage can return 429 with details.reason=workspace-quota.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdAgentWorkspaceTasksTaskIdTransitions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/archive":{"post":{"summary":"Archive a project and the documents it currently holds.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdArchive","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts":{"get":{"summary":"List documents (metadata only). ?status=archived for the archived listing.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdArtifacts","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items per page."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Offset in newest-first order with ID as tie-breaker. Concurrent writes may shift later pages."},{"name":"propertyFilter","in":"query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPropertyFilter"}}},"description":"One literal JSON filter with required annotations/custom or currentVersion/custom|extracted scope. Only filter, limit and offset controls are accepted; filtered results include captured propertyMatch identity/tokens and liveView true. When supplied, limit defaults to 20 and must be 1–50; offset must be 0–10000. Equality is type-sensitive; stale extracted properties never match. Property values are not returned."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"}},"required":["items","limit","offset","hasMore"],"additionalProperties":false},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"logicalName":{"type":"string"},"sourceFormat":{"type":"string"},"detectedFormat":{"type":"string"},"detectionConfidence":{"type":"number"},"formatPinned":{"type":"boolean"},"validationStatus":{"type":"string","enum":["valid","invalid",null],"nullable":true},"validationMessage":{"type":"string","nullable":true},"contentHash":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"status":{"type":"string","enum":["active","archived","deleted"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"projectId":{"type":"string"},"version":{"type":"string","nullable":true},"propertyMatch":{"type":"object","properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"head":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false},"annotations":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true}},"required":["revision","sequence","updateId"],"additionalProperties":false},"versionMetadata":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true}},"required":["revision","sequence","updateId"],"additionalProperties":false}},"required":["projectId","documentId","head","annotations","versionMetadata"],"additionalProperties":false}},"required":["id","logicalName","sourceFormat","detectedFormat","detectionConfidence","formatPinned","validationStatus","validationMessage","contentHash","sizeBytes","status","createdAt","updatedAt","projectId","version","propertyMatch"],"additionalProperties":false}},"limit":{"type":"integer","minimum":1,"maximum":50},"offset":{"type":"integer","minimum":0,"maximum":10000},"hasMore":{"type":"boolean"},"liveView":{"type":"boolean","enum":[true]}},"required":["items","limit","offset","hasMore","liveView"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create ONE document, or explicitly replace captured state. `name` is a leaf; folders travel in `folderPath`, and `createFolders` makes the missing ones. Without paired `expectedId` and `expectedRevision`, creation is atomic and a taken path refuses with 409 `document-exists`, even for identical content. Replacement checks the captured stable ID, destination and revision in storage; stale, moved or reused state refuses with 409 `document-changed`. `ifNotExists: true` and `copyFrom` cannot carry replacement authority. Live endpoint documents and reserved destinations refuse manual writes with 409 `endpoint-read-only`. To create an independent editable copy, supply `copyFrom: { logicalName, id, contentHash }` with a new `name` and optional `folderPath`; this copies stored raw content, saved display options and document variables, forces create-only behavior and refuses a changed source with 409 `source-changed`.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdArtifacts","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPublish"}}}},"responses":{"200":{"description":"Guarded identical content is unchanged.","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string","enum":["create","update","no-op"]}},"required":["artifact","decision"],"additionalProperties":false}}}},"201":{"description":"Created or explicitly replaced document.","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string","enum":["create","update","no-op"]}},"required":["artifact","decision"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}":{"delete":{"summary":"Delete a document. Version rows a publication was made from are retained, so releases stay readable.","tags":["Documents"],"operationId":"deleteApiV1ProjectsProjectIdArtifactsLogicalName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One document with its content. The name is the document’s FULL path, percent-encoded into a single segment. ?version=<id> reads a historical snapshot. Metadata reads carry authoritative `readOnly` and ID-qualified `endpointSources`; unlinking the source retains the document and history. The live read carries `sensitiveContent` (`{ kind, label }`, or null) and `sharingBlocked`: true when the document is potentially sensitive and the owning team blocks sharing it (or the policy cannot be read).","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/archive":{"post":{"summary":"Archive a document; it keeps its path and can be restored.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdArtifactsLogicalNameArchive","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/display-options":{"put":{"summary":"Save how a document is displayed (its default render options everywhere)","tags":["Renders"],"operationId":"putApiV1ProjectsProjectIdArtifactsLogicalNameDisplayOptions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/rename":{"post":{"summary":"Rename a document inside its folder. The body is `{ \"name\": \"<new leaf name>\" }`; moving to another folder is not supported and a `folderPath` field is refused. Refused with 409 when a document or folder already has that full path ignoring letter case (`details.reason` is `document-exists` or `path-taken`, and `details.existing` names it), when an endpoint writes the document (`endpoint-managed`) or claims the name (`endpoint-name`). Refused with 400 when the new name breaks the naming rule (`invalid-name`), contains \"/\" (`path-in-name`) or would make the full path too long (`path-too-long`), and with 409 `concurrent-change` when the document changed during the rename; try again. The id, version history, shares and variables stay with the document; releases keep the name they were published with. A rename to the current name changes nothing and returns `renamed: false`.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdArtifactsLogicalNameRename","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/render-options":{"get":{"summary":"The render options a document offers, its saved display options and the effective values","tags":["Renders"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameRenderOptions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/renders/{format}":{"get":{"summary":"Render a document to pdf, docx, html, epub or md (Markdown snapshot; `?variables=raw|resolved`). Conditional (ETag) and rate-limited per team.","tags":["Renders"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameRendersFormat}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"format","in":"path","required":true,"schema":{"type":"string"}},{"name":"paperSize","in":"query","schema":{"type":"string","enum":["A3","A4","A5","Letter","Legal"]},"description":"Transient paper size after saved settings and front matter; invalid or duplicate values are rejected. Omit to use document defaults."},{"name":"paperOrientation","in":"query","schema":{"type":"string","enum":["portrait","landscape"]},"description":"Transient paper orientation; does not alter content, style or saved settings."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/restore":{"post":{"summary":"Restore an archived document.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdArtifactsLogicalNameRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/shares":{"get":{"summary":"Share links for a document.","tags":["Shares"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameShares","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a share link. A custom name or a password requires the advanced-sharing capability: asking for either without it refuses the whole call (403 PLAN_RESTRICTION) and creates no share, rather than returning a share that quietly has neither. A plain share works on every plan. A password is 8 to 128 characters. The response carries `sensitiveContent` (`{ kind, label }`) when the document holds potentially sensitive content; pass `acknowledgeSensitive: true` to record that the person creating the link was warned. The warning never blocks the share. While the owning team blocks sensitive sharing (`PATCH /teams/{teamId}/settings`), a potentially sensitive document is refused with 403 UNAUTHORIZED, `details.reason: team-policy`. When the policy cannot be read, nothing is created and the call answers 503 CONFIG, `details.reason: team-policy-unavailable`; try again.","tags":["Shares"],"operationId":"postApiV1ProjectsProjectIdArtifactsLogicalNameShares","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/variables":{"delete":{"summary":"Delete every document-scope variable.","tags":["Variables"],"operationId":"deleteApiV1ProjectsProjectIdArtifactsLogicalNameVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"Document-scope variables, plus the reserved built-in names.","tags":["Variables"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Replace the document-scope variable set.","tags":["Variables"],"operationId":"putApiV1ProjectsProjectIdArtifactsLogicalNameVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/variables/{name}":{"delete":{"summary":"Delete one document-scope variable.","tags":["Variables"],"operationId":"deleteApiV1ProjectsProjectIdArtifactsLogicalNameVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One document-scope variable.","tags":["Variables"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Create or update one document-scope variable.","tags":["Variables"],"operationId":"putApiV1ProjectsProjectIdArtifactsLogicalNameVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/versions":{"get":{"summary":"Version history, newest first. Paid capability.","tags":["Versions"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameVersions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/versions/{versionId}":{"get":{"summary":"One historical snapshot, with its content.","tags":["Versions"],"operationId":"getApiV1ProjectsProjectIdArtifactsLogicalNameVersionsVersionId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/artifacts/{logicalName}/versions/{versionId}/restore":{"post":{"summary":"Republish a historical snapshot as the newest version; history is preserved.","tags":["Versions"],"operationId":"postApiV1ProjectsProjectIdArtifactsLogicalNameVersionsVersionIdRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/bundle":{"get":{"summary":"Every document in the project as a ZIP. source is available on every plan; pdf and docx need bulk-export.","tags":["Renders"],"operationId":"getApiV1ProjectsProjectIdBundle","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/comments":{"get":{"summary":"Page through project-level comments oldest-first by default. Ready Agent Workspaces can use order=desc and a limit/cursor for newest-first pages (no time windows or polling in this mode). order=recent alone returns the three latest project comments. The optional scope=all lists visible project, document, task, and requirement comments newest first for the web app. Cursors cannot be reused in a different scope or order. Available to a signed-in person only: project-restricted and client-credentials (machine) credentials are refused.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The unchanged nextCursor or resumeCursor from the same list and filters."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Inclusive creation time with explicit UTC offset and at most millisecond precision."},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Exclusive creation time with explicit UTC offset and at most millisecond precision."},{"name":"poll","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When true, also return a sequence-based resumeCursor when nextCursor is null."},{"name":"order","in":"query","schema":{"type":"string","enum":["recent","desc"]},"description":"Omit for oldest-first. recent alone previews three project comments. desc is for ready Agent Workspaces, with limit/cursor for paging or commentId for an exact comment."},{"name":"commentId","in":"query","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$"},"description":"With order=desc alone, return at most this one project comment. An unavailable comment returns an empty page."},{"name":"scope","in":"query","schema":{"type":"string","enum":["all"]},"description":"From a current web app session, list project and document comments and comments on tasks and requirements in a ready Agent Workspace, newest first. Use only limit and cursor with scope=all."}],"x-required-scope":"documents:read","responses":{"200":{"description":"A page of project comments, a latest project preview, or a newest-first page across visible project sources when scope=all.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":false,"required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}},"description":"In the order the comments were committed. The order is assigned by the store when the comment is saved and is never a field of the comment."},"nextCursor":{"type":"string","nullable":true,"description":"Opaque; pass as cursor with the same scope, normalized bounds and poll mode. Ordinary list cursors are refused with 400 if the anchor no longer exists. Null at the end."},"resumeCursor":{"type":"string","description":"Present only on a terminal poll page, including an empty one. Pass as cursor with the same scope, bounds and poll=true on your next poll; do not advance since based on wall time."}}},{"type":"object","additionalProperties":false,"required":["items","nextCursor"],"properties":{"nextCursor":{"type":"string","nullable":true,"description":"Opaque, scoped to the signed-in reader and project. Null at the end."},"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","body","createdAt","source","authorName","agent"],"properties":{"id":{"type":"string"},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"createdAt":{"type":"string","format":"date-time"},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"source":{"type":"object","additionalProperties":false,"required":["kind","id","label"],"properties":{"kind":{"type":"string","enum":["project","document","task","requirement"]},"id":{"type":"string"},"label":{"type":"string","nullable":true}}}}}}}}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Comment on a project, or reply to one of its top-level project comments with parentCommentId. The author is always the signed-in user. Retry safely with idempotencyKey. Requires a role that may edit documents, rechecked when the comment is committed; refused while the project is archived. A signed-in person only: project-restricted and client-credentials (machine) credentials are refused.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":4000},"parentCommentId":{"type":"string","nullable":true,"description":"Reply to a top-level comment of the same project or document. The server rejects a parent from any other scope."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:-]+$","description":"Makes a retry safe: the same key with the same request returns the original comment (200); a different request with that key is a 409. Send it in the body from a browser: the Idempotency-Key header is the same key for other callers, but it is not in this API's CORS allow-list. A header that disagrees with the body field is refused."}}}}}},"responses":{"200":{"description":"The same request was already accepted under this idempotencyKey; the original comment is returned and nothing new is written.","content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"201":{"description":"Comment created.","content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents":{"post":{"summary":"Write up to 50 documents. Each entry creates only by default; explicit replacement requires its paired captured `expectedId` and `expectedRevision`. Duplicate destinations, malformed authority and known collisions are refused before document writes. Every write atomically enforces create-only or the captured identity/revision fence; a concurrent change refuses with 409 `document-changed`. Entries commit individually, so a later racing conflict can leave earlier entries committed. Same folder rules as the single-document route: leaf names, a `folderPath` (per batch or per entry), and optional `createFolders`.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocuments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpload"}}}},"responses":{"201":{"description":"Documents created or explicitly replaced.","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocumentWriteResult"}}},"required":["documents"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}":{"delete":{"summary":"Permanently delete a document by stable ID (owner/admin only). Requires expectedRevision; source documents managed by endpoints remain read-only.","tags":["Documents"],"operationId":"deleteApiV1ProjectsProjectIdDocumentsDocumentId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGuard"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}},"get":{"summary":"Read a document by its stable ID. Display version defaults to the string 1; revision is an opaque state guard, not a version number.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string"},"logicalName":{"type":"string"},"sourceFormat":{"type":"string"},"detectedFormat":{"type":"string"},"detectionConfidence":{"type":"number"},"formatPinned":{"type":"boolean"},"validationStatus":{"type":"string","enum":["valid","invalid",null],"nullable":true},"validationMessage":{"type":"string","nullable":true},"contentHash":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"version":{"type":"string","description":"Release label when present; otherwise the string 1. This projection does not write a release label to storage."},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"status":{"type":"string","enum":["active","archived","deleted"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"sourceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256 of the exact source bytes returned. Present only on a current full read of an ordinary (unprotected) document, never on historical snapshots; use it as expectedSourceSha256 on update."},"displayOptions":{"type":"object","additionalProperties":true},"readOnly":{"type":"boolean"},"endpointSources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string"}},"required":["id","name","projectId","documentId"],"additionalProperties":false}},"appendEpoch":{"type":"object","properties":{"documentId":{"type":"string"},"idempotencyEpoch":{"type":"string"},"admissionClosesAt":{"type":"integer","minimum":0},"recordRetainedUntil":{"type":"integer","minimum":0}},"required":["documentId","idempotencyEpoch","admissionClosesAt","recordRetainedUntil"],"additionalProperties":false},"content":{"type":"string"},"versionId":{"type":"string","nullable":true},"sourceIdentity":{"type":"object","properties":{"versionId":{"type":"string"},"fingerprint":{"type":"object","properties":{"version":{"type":"integer","enum":[1]},"sourceHash":{"type":"string"},"sourceFormat":{"type":"string"},"formatPinned":{"type":"boolean","nullable":true}},"required":["version","sourceHash","sourceFormat","formatPinned"],"additionalProperties":false,"nullable":true},"sequence":{"type":"integer"},"displayLabel":{"type":"string"}},"required":["versionId","fingerprint","sequence","displayLabel"],"additionalProperties":false,"nullable":true},"propertyAvailability":{"type":"string","enum":["enabled","inactive"]}},"required":["id","logicalName","sourceFormat","detectedFormat","detectionConfidence","formatPinned","validationStatus","validationMessage","contentHash","sizeBytes","version","revision","status","createdAt","updatedAt","sourceSha256","displayOptions","readOnly","endpointSources","appendEpoch","content","versionId","sourceIdentity","propertyAvailability"],"additionalProperties":true}},"required":["document"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Update an active document by stable ID. Requires expectedRevision from a live read; a stale captured state is refused with 409 CONFLICT and reason document-changed. Identical content is a no-op.","tags":["Documents"],"operationId":"putApiV1ProjectsProjectIdDocumentsDocumentId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string","enum":["create","update","no-op"]}},"required":["document","decision"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/append":{"post":{"summary":"Append exact UTF-8 text to an active Markdown/plain-text document. Require the original revision, epoch and key; return the exact committed version and byte/line receipt. Retry only the same operation after uncertainty.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdAppend","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"If supplied, must exactly match body.idempotencyKey."}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentAppendInput"}}}},"responses":{"200":{"description":"Exact accepted-operation receipt. Empty input creates no content version or event. Retained exact retries return the original version even after a later edit.","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/DocumentAppendReceipt"}},"required":["receipt"],"additionalProperties":false}}}},"400":{"description":"Invalid/unknown input, unsupported source format, malformed Unicode or header/body identity mismatch."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Stale source, reused key with changed input, or closed epoch. Keep the original epoch/key/revision for uncertain-result reconciliation; never silently refresh."},"429":{"description":"UTF-8 payload/final-size limit, quota or service budget refused. Inspect details.reason."},"500":{"description":"Confirmation may be unavailable after acceptance. details.writeOutcome=committed means retain and retry the original operation; do not create another identity."},"503":{"description":"Required policy/storage authority unavailable; no fallback writer."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/archive":{"post":{"summary":"Archive a document by stable ID with expectedRevision, retaining its path and history.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdArchive","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGuard"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/comments":{"get":{"summary":"Page through the comments on one document in committed order, by an opaque cursor bound to this list. Requires read access to the project. Available to a signed-in person only: project-restricted and client-credentials (machine) credentials are refused. Comments never create or change a version or a version note.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The unchanged nextCursor or resumeCursor from the same list and filters."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Inclusive creation time with explicit UTC offset and at most millisecond precision."},{"name":"until","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Exclusive creation time with explicit UTC offset and at most millisecond precision."},{"name":"poll","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"When true, also return a sequence-based resumeCursor when nextCursor is null."}],"x-required-scope":"documents:read","responses":{"200":{"description":"A page of comments in committed order.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["items","nextCursor"],"properties":{"items":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}},"description":"In the order the comments were committed. The order is assigned by the store when the comment is saved and is never a field of the comment."},"nextCursor":{"type":"string","nullable":true,"description":"Opaque; pass as cursor with the same scope, normalized bounds and poll mode. Ordinary list cursors are refused with 400 if the anchor no longer exists. Null at the end."},"resumeCursor":{"type":"string","description":"Present only on a terminal poll page, including an empty one. Pass as cursor with the same scope, bounds and poll=true on your next poll; do not advance since based on wall time."}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Comment on a document, or reply to one of its top-level comments with parentCommentId. The author is always the signed-in user; no field can name an author or a scope, and unknown fields are refused. Retry safely with idempotencyKey. Requires a role that may edit documents, rechecked when the comment is committed; refused while the document or project is archived. A signed-in person only: project-restricted and client-credentials (machine) credentials are refused.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdComments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":4000},"parentCommentId":{"type":"string","nullable":true,"description":"Reply to a top-level comment of the same project or document. The server rejects a parent from any other scope."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9_.:-]+$","description":"Makes a retry safe: the same key with the same request returns the original comment (200); a different request with that key is a 409. Send it in the body from a browser: the Idempotency-Key header is the same key for other callers, but it is not in this API's CORS allow-list. A header that disagrees with the body field is refused."}}}}}},"responses":{"200":{"description":"The same request was already accepted under this idempotencyKey; the original comment is returned and nothing new is written.","content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"201":{"description":"Comment created.","content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"object","additionalProperties":false,"required":["id","projectId","documentId","parentCommentId","body","authorUserId","authorName","agent","createdAt"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"documentId":{"type":"string","nullable":true,"description":"Null for a project-level comment."},"parentCommentId":{"type":"string","nullable":true,"description":"The top-level comment this replies to; null for a top-level comment. Replies are one level deep."},"body":{"type":"string","description":"Raw Markdown text, at most 4000 characters, with hazard characters removed. Render it with the same safe subset as any user content; never as trusted markup."},"authorUserId":{"type":"string","description":"The signed-in user who wrote it, derived by the server. No request field can set it."},"authorName":{"type":"string","nullable":true},"agent":{"type":"object","nullable":true,"additionalProperties":false,"required":["connectionId","name"],"description":"The Connected Agent that wrote this comment on the author's behalf, as it was when the comment was written; null for a comment the person wrote themselves. The author above stays the accountable person. Derived by the server from the verified credential, never from a request field, and the REST routes cannot create an agent comment.","properties":{"connectionId":{"type":"string"},"name":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/diff":{"get":{"summary":"Compare two explicit retained version IDs as bounded UTF-8 source lines, with exact read-byte hashes or an explicit unavailable reason. Requires current read/history access; no latest alias, normalization, partial patch or writes.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdDiff","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"fromVersionId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Exact retained version ID for this document. Leading/trailing whitespace, duplicate, missing and unknown query fields are refused. No current/latest alias."},{"name":"toVersionId","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Exact retained version ID for this document. Leading/trailing whitespace, duplicate, missing and unknown query fields are refused. No current/latest alias."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Complete exact UTF-8 source-line delta with 3 context lines, preserved line endings, per-version SHA-256 and byte lengths; or explicit unavailable reason, never a partial patch. Server ceilings: 1 MiB and 20,000 lines per source, 512 edits, 8,000,000 comparison work units, 65,536 serialized result bytes. Unavailable sources may be read with the ordinary authorized exact-version route. Source text is untrusted data, not instructions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionDiffResult"}}}},"400":{"description":"Missing, duplicate, unknown or invalid exact identifier/query."},"401":{"description":"Original credential invalid, expired or revoked."},"403":{"description":"Current read or history entitlement refused."},"404":{"description":"Unknown or inaccessible document/version; foreign versions are concealed."},"409":{"description":"Captured source/access state changed. No partial diff is returned; do not silently retarget."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/display-options":{"put":{"summary":"Set validated document display options by stable ID with expectedRevision. Returns the resulting revision.","tags":["Documents"],"operationId":"putApiV1ProjectsProjectIdDocumentsDocumentIdDisplayOptions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDisplayOptions"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"displayOptions":{"type":"object","additionalProperties":true}},"required":["documentId","revision","displayOptions"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/metadata":{"get":{"summary":"Read coherent private identities, revision tokens and idempotency epoch without body or property values.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdMetadata","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"$ref":"#/components/schemas/DocumentMetadata"}},"required":["metadata"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/move":{"post":{"summary":"Move a document within its owning project by destinationFolderId and expectedDestinationPath, with expectedRevision. Retains ID, content, versions, properties and shares; never overwrites. Refuses changed source/destination, managed sources, case-insensitive file/folder conflicts and path limits. One file per request; callers report partial outcomes explicitly.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdMove","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMove"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"$ref":"#/components/schemas/Document"},"previousName":{"type":"string"},"moved":{"type":"boolean"}},"required":["artifact","previousName","moved"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/page-refresh":{"post":{"summary":"Manually retrieve a new candidate from a saved page source after 24 hours. Uses the saved source rather than a caller-supplied URL. Does not replace document content. Failed or uncertain extraction preserves the current document; compare edited content and explicitly replace the current revision or save a new copy.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdPageRefresh","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","description":"Client-generated UUID. Replay the same requestId after an uncertain response; this does not bypass quota or cooldown."}},"required":["requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"New review candidate. Current content is preserved until an explicit guarded save.","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string","description":"Untrusted Markdown for editable review; at most 1 MB UTF-8. Does not replace a saved document."},"title":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"canonicalUrl":{"type":"string","nullable":true},"retrievedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","nullable":true},"expectedRevision":{"type":"string","nullable":true},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","content","title","requestedUrl","finalUrl","retrievedAt","expiresAt","warnings"],"additionalProperties":false},"usage":{"type":"object","properties":{"used":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"resetsAt":{"type":"string","format":"date-time"}},"required":["used","reserved","limit","resetsAt"],"additionalProperties":false,"nullable":true,"description":"Project-restricted credentials receive null to suppress team-wide page-import usage and reservations. Other credentials retain the team monthly allowance."}},"required":["preview","usage"],"additionalProperties":false}}}},"400":{"description":"INVALID_REQUEST: public HTTPS single URL only. Credentials, private/internal targets and unsupported responses are refused."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"CONFLICT. details.reason page-cooldown includes retryAt; page-in-flight and page-retry-later refuse duplicate or too-frequent attempts. Cooldown and deduplication are enforced across UI, API, CLI and MCP."},"429":{"description":"LIMIT_EXCEEDED. details.reason page-monthly-limit or attempt/global-abuse limits. A failed extraction does not consume the monthly allowance; bounded retry controls still apply."},"502":{"description":"UPSTREAM_ERROR with details.reason page-extraction-uncertain. No candidate is saved and the current document is preserved. Do not retry automatically."},"503":{"description":"CONFIG with details.reason page-unavailable. Page import is disabled or its renderer is unavailable."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/page-source":{"get":{"summary":"Read requested, final and optional canonical URL provenance, applied snapshot and latest successful retrieval state, plus team page-import usage (null for project-restricted credentials). No retrieval or monitoring.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdPageSource","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Saved provenance and usage. Does not retrieve or monitor the source.","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"object","properties":{"requestedUrl":{"type":"string"},"finalUrl":{"type":"string","nullable":true},"canonicalUrl":{"type":"string","nullable":true},"lastRetrievedAt":{"type":"string","format":"date-time","nullable":true},"nextRefreshAt":{"type":"string","format":"date-time","nullable":true},"lastAttemptAt":{"type":"string","format":"date-time","nullable":true},"lastError":{"type":"string","nullable":true},"retryAfter":{"type":"string","format":"date-time","nullable":true},"lastAppliedAt":{"type":"string","format":"date-time","nullable":true},"appliedRetrievedAt":{"type":"string","format":"date-time","nullable":true},"lastSavedHash":{"type":"string"},"appliedRequestedUrl":{"type":"string"},"appliedFinalUrl":{"type":"string"},"appliedCanonicalUrl":{"type":"string","nullable":true}},"required":["requestedUrl","finalUrl","canonicalUrl","lastRetrievedAt","nextRefreshAt","lastAttemptAt","lastError","retryAfter","lastAppliedAt","appliedRetrievedAt","lastSavedHash","appliedRequestedUrl","appliedFinalUrl","appliedCanonicalUrl"],"additionalProperties":false,"nullable":true,"description":"Latest retrieval and applied snapshot provenance are separate. Null for a document without a page source."},"usage":{"type":"object","properties":{"used":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"resetsAt":{"type":"string","format":"date-time"}},"required":["used","reserved","limit","resetsAt"],"additionalProperties":false,"nullable":true,"description":"Project-restricted credentials receive null to suppress team-wide page-import usage and reservations. Other credentials retain the team monthly allowance."}},"required":["source","usage"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/properties":{"get":{"summary":"Read private named values: document properties in annotations.custom and current-version properties in versionMetadata.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"properties":{"$ref":"#/components/schemas/DocumentProperties"}},"required":["properties"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}},"patch":{"summary":"Update document properties with plain native values in custom.set or explicit custom.remove. Preserve original epoch/key and expectedAnnotationsRevision for retry; returns the original receipt.","tags":["Documents"],"operationId":"patchApiV1ProjectsProjectIdDocumentsDocumentIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPropertiesPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/PropertyUpdateReceipt"},"serviceGuidance":{"$ref":"#/components/schemas/ServiceGuidance"}},"required":["receipt"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/properties/history":{"get":{"summary":"Read retained document property states, newest first. Use offset for more and offset 0 to refresh.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdPropertiesHistory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"revisionId","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Exact retained snapshot; requires offset 0. Unknown/duplicate query parameters and cursors rejected."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true},"attribution":{"type":"object","additionalProperties":true},"custom":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"createdAt":{"type":"string","format":"date-time","description":"When this property revision was recorded. Migration snapshots record activation time, not an inferred earlier source edit."}},"required":["revision","sequence","updateId","attribution","custom","createdAt"],"additionalProperties":false}},"limit":{"type":"integer"},"offset":{"type":"integer"},"liveView":{"type":"boolean","enum":[true]}},"required":["items","limit","offset","liveView"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/properties/history/reclaim":{"post":{"summary":"Explicit owner/admin selected noncurrent property history reclamation; requires versioning. Protected targets conflict.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdPropertiesHistoryReclaim","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyHistorySelection"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"reclamation":{"type":"object","properties":{"auditEventId":{"type":"string","nullable":true},"annotationsRemoved":{"type":"integer"},"metadataRemoved":{"type":"integer"}},"required":["auditEventId","annotationsRemoved","metadataRemoved"],"additionalProperties":false}},"required":["reclamation"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/rename":{"post":{"summary":"Rename a document by stable ID within its current folder. Requires name and expectedRevision; ID and history remain unchanged. Case-insensitive name collisions are refused.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdRename","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRename"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"artifact":{"$ref":"#/components/schemas/Document"},"previousName":{"type":"string"},"renamed":{"type":"boolean"}},"required":["artifact","previousName","renamed"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/render-options":{"get":{"summary":"Read document-specific render descriptors, saved options, effective values, and the current revision by stable ID.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdRenderOptions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"type":"string"},"revision":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque artifact state revision from a live read. Not a display version or a monotonic counter."},"format":{"type":"string"},"descriptors":{"type":"array","items":{"type":"object","additionalProperties":true}},"displayOptions":{"type":"object","additionalProperties":true},"effective":{"type":"object","additionalProperties":true}},"required":["documentId","revision","format","descriptors","displayOptions","effective"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/renders/{format}":{"get":{"summary":"Download a render by stable ID. Supports conditional If-None-Match and returns 304 without a body when unchanged.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdRendersFormat}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-None-Match","in":"header","schema":{"type":"string"}},{"name":"variables","in":"query","schema":{"type":"string","enum":["raw","resolved"]},"description":"Markdown renders only."},{"name":"paperSize","in":"query","schema":{"type":"string","enum":["A3","A4","A5","Letter","Legal"]},"description":"Transient paper size after saved settings and front matter; invalid or duplicate values are rejected. Omit to use document defaults."},{"name":"paperOrientation","in":"query","schema":{"type":"string","enum":["portrait","landscape"]},"description":"Transient paper orientation; does not alter content, style or saved settings."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Rendered document bytes.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Unchanged; no response body."},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/restore":{"post":{"summary":"Restore an archived document by stable ID with expectedRevision, subject to the document plan limit.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentArchiveRestore"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"previousName":{"type":"string"},"artifact":{"$ref":"#/components/schemas/Document"}},"required":["ok","previousName","artifact"],"additionalProperties":false}]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/shares":{"get":{"summary":"Page through unrevoked shares by stable document ID, newest first with an ID tie-breaker. Expired shares remain visible until revoked.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdShares","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items per page."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Offset in newest-first order with ID as tie-breaker. Concurrent writes may shift later pages."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSharePage"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a share for an active document by stable ID, subject to existing plan, sensitive-sharing, password, and brand policies.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdShares","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentShareCreate"}}}},"responses":{"201":{"description":"Created share.","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"artifactId":{"type":"string"},"token":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"name":{"type":"string"},"namespace":{"type":"string"},"passwordProtected":{"type":"boolean"},"brandAssetId":{"type":"string","nullable":true},"url":{"type":"string"}},"required":["id","projectId","artifactId","token","createdAt","expiresAt","revokedAt","passwordProtected","brandAssetId","url"],"additionalProperties":false}},"required":["share"],"additionalProperties":true}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Conflict. A stale document state has code CONFLICT and details.reason document-changed; read the document and decide whether to retry. Name collisions and plan limits also use CONFLICT."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/tail":{"get":{"summary":"Read bounded whole UTF-8 lines from the end, or page backward with a version-bound private cursor. Changes require explicit reset; no source mutation.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdTail","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"lines","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100},"description":"Whole LF-delimited lines. Exclusive of cursor. Canonical positive decimal; duplicate/unknown query fields rejected."},{"name":"maxBytes","in":"query","schema":{"type":"integer","minimum":1,"maximum":65536,"default":65536},"description":"Returned UTF-8 byte ceiling. Never splits a line or code point. Exclusive of cursor."},{"name":"cursor","in":"query","schema":{"type":"string","pattern":"^tail-v1\\.[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"description":"Supply alone to page backward over the exact source. Bound to actor/consent client and project access generation; expires 900 seconds after original issue, never renewed by retry."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Private exact UTF-8 whole-line content plus source revision/hash, total and window counts, zero-based exclusive byte boundaries and asOf SQL clock. Legacy versionId is null; managed sources name the authoritative current head. Source-work ceiling 10,000,000 bytes. An oversized newest line returns empty content, hasMore=true, limitedBy=line-too-large and no cursor. No body/version/audit publication.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentTailResult"}}}},"400":{"description":"Invalid/duplicate/unknown/mixed query, malformed UTF-8 or unsupported source."},"401":{"description":"Original credential expired, revoked or lost its original grant."},"403":{"description":"Read scope or current read authority refused."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"details.reason=tail-cursor-reset: unavailable/expired cursor or changed source/access generation. Explicitly read afresh without cursor; never silently refresh."},"429":{"description":"Source-work or tenant continuation-capacity bound refused. Wait for expiry or use ordinary authorized source reading."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/updates/{updateId}":{"get":{"summary":"Read or update private exact property targets with current access and applicable history checks. Returns reviewed snapshot, bounded live history or operation receipt.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdUpdatesUpdateId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"updateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/PropertyUpdateReceipt"},"serviceGuidance":{"$ref":"#/components/schemas/ServiceGuidance"}},"required":["receipt"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/variables":{"get":{"summary":"Read document variables by stable ID, preserving project containment and read scope.","tags":["Variables"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/variables/{name}":{"delete":{"summary":"Remove one document variable by stable ID. Endpoint-owned documents remain read-only. Variable updates do not use the content revision guard.","tags":["Variables"],"operationId":"deleteApiV1ProjectsProjectIdDocumentsDocumentIdVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Set one document variable by stable ID. Endpoint-owned documents remain read-only. Variable updates do not use the content revision guard and replace a same-name value.","tags":["Variables"],"operationId":"putApiV1ProjectsProjectIdDocumentsDocumentIdVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/versions":{"get":{"summary":"Page through document snapshots by stable ID, newest first with an ID tie-breaker. Requires the version-history capability.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVersions","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"Maximum items per page."},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Offset in newest-first order with ID as tie-breaker. Concurrent writes may shift later pages."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionPage"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/versions/{versionId}":{"get":{"summary":"Read an actual historical snapshot by document and version ID. Hash, bytes, content, and source format belong to the snapshot; live display version and revision are absent.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVersionsVersionId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"$ref":"#/components/schemas/DocumentSnapshot"}},"required":["version"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/documents/{documentId}/versions/{versionId}/properties":{"get":{"summary":"Read properties for one exact version, with document properties remaining current. Requires current read and applicable history access.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVersionsVersionIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"properties":{"$ref":"#/components/schemas/DocumentProperties"}},"required":["properties"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}},"patch":{"summary":"Update one exact version with native values in custom.set or extracted.set and explicit remove lists. Preserve original epoch/key and expectedMetadataRevision for retry.","tags":["Documents"],"operationId":"patchApiV1ProjectsProjectIdDocumentsDocumentIdVersionsVersionIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionMetadataPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/PropertyUpdateReceipt"},"serviceGuidance":{"$ref":"#/components/schemas/ServiceGuidance"}},"required":["receipt"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/versions/{versionId}/properties/history":{"get":{"summary":"Read retained property states for one exact version, newest first. Requires current read and applicable history access.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVersionsVersionIdPropertiesHistory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"revisionId","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"description":"Exact retained snapshot; requires offset 0. Unknown/duplicate query parameters and cursors rejected."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"revision":{"type":"string","minLength":1,"maxLength":256,"description":"Opaque equality token; never order or infer state from timestamps."},"sequence":{"type":"integer"},"updateId":{"type":"string","nullable":true},"attribution":{"type":"object","additionalProperties":true},"custom":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"extracted":{"type":"object","maxProperties":64,"description":"Case-sensitive ASCII identifier keys (1–64 characters); reserved prototype segments refused. Scalars or scalar arrays only. Max 16 KiB canonical UTF-8 JSON per namespace; strings max 2048 UTF-8 bytes.","additionalProperties":{"anyOf":[{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]},{"type":"array","maxItems":32,"items":{"anyOf":[{"type":"string","nullable":true,"maxLength":2048},{"type":"number"},{"type":"boolean"}]}}]}},"claims":{"type":"object","properties":{"extractor":{"type":"string","maxLength":64},"extractorVersion":{"type":"string","maxLength":64},"externalRunId":{"type":"string","maxLength":64}},"required":[],"additionalProperties":false,"nullable":true},"versionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"When this property revision was recorded. Migration snapshots record activation time, not an inferred earlier source edit."}},"required":["revision","sequence","updateId","attribution","custom","extracted","claims","versionId","createdAt"],"additionalProperties":false}},"limit":{"type":"integer"},"offset":{"type":"integer"},"liveView":{"type":"boolean","enum":[true]}},"required":["items","limit","offset","liveView"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/versions/{versionId}/restore":{"post":{"summary":"Restore a historical snapshot to the same stable document ID with expectedRevision. Preserves history and folder, and creates a new snapshot only when content changes.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsDocumentIdVersionsVersionIdRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRestoreRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/PropertyUpdateReceipt"},"serviceGuidance":{"$ref":"#/components/schemas/ServiceGuidance"}},"required":["receipt"],"additionalProperties":false},{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string","enum":["create","update","no-op"]},"restoredFrom":{"type":"string"}},"required":["document","decision","restoredFrom"],"additionalProperties":false}]}}}},"201":{"description":"New enabled restore receipt; retain original four identity fields.","content":{"application/json":{"schema":{"type":"object","properties":{"receipt":{"$ref":"#/components/schemas/PropertyUpdateReceipt"},"serviceGuidance":{"$ref":"#/components/schemas/ServiceGuidance"}},"required":["receipt"],"additionalProperties":false}}}},"400":{"description":"Invalid or unknown control fields, query or bounds."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Insufficient current access or applicable history/maintenance authority."},"404":{"description":"Unknown or inaccessible target."},"409":{"description":"Reconcile details.reason: annotations-changed, metadata-changed, head-changed, idempotency-mismatch, operation-in-progress, properties-unavailable, or protected reclamation target. Retry only original identity/CAS/version; never silently refresh."},"410":{"description":"Authorized target-expired or operation-expired while bounded evidence retained."},"429":{"description":"Capacity or write budget refused. Inspect stable details.reason and serviceGuidance; only a timed throttle supplies Retry-After.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Actual known wait only; absent for capacity refusal."}}},"503":{"description":"Write budget enforcement unavailable; retain original identity. No retry timing is invented."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/vulnerability-scan":{"get":{"summary":"Read document inherit/off settings and effective blockers through current tenant/private-project authority. This metadata slice reports eligibility not-assessed and rollout-disabled; it does not claim scan eligibility or complete coverage.","tags":["Security"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVulnerabilityScan","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Current private settings metadata or guarded mutation receipt; no provider call or content eligibility claim.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"settings":{"type":"object","additionalProperties":false,"properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"policyRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"preferenceEnabled":{"type":"boolean"},"override":{"type":"string","enum":["inherit","off"]},"adoption":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["missing","accepted","outdated","revoked"]},"requiredDisclosureVersion":{"type":"string","enum":["sbom-scan-osv-v2"]},"scope":{"type":"string","enum":["eligible-existing-and-future",null],"nullable":true},"acceptedAt":{"type":"string","format":"date-time","nullable":true}},"required":["status","requiredDisclosureVersion","scope","acceptedAt"]},"policyGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"effectiveGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"effectiveEnabled":{"type":"boolean"},"blockers":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["team-off","document-off","adoption-required","disclosure-outdated","adoption-revoked","rollout-disabled","eligibility-not-assessed","ineligible"]}},"eligibility":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["not-assessed","eligible","ineligible"]}},"required":["status"]}},"required":["revision","policyRevision","preferenceEnabled","override","adoption","policyGeneration","documentGeneration","effectiveGeneration","effectiveEnabled","blockers","eligibility"]}},"required":["projectId","documentId","settings"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Set an active document to off or inherit with expected document and team-policy revisions. Requires document-write authority and current project-update role. Available without adoption or content eligibility; inherit retains a new generation and does not activate processing.","tags":["Security"],"operationId":"putApiV1ProjectsProjectIdDocumentsDocumentIdVulnerabilityScan","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"mode":{"type":"string","enum":["inherit","off"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"expectedPolicyRevision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["mode","expectedRevision","expectedPolicyRevision"]}}}},"responses":{"200":{"description":"Current private settings metadata or guarded mutation receipt; no provider call or content eligibility claim.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string"},"documentId":{"type":"string"},"changed":{"type":"boolean"},"settings":{"type":"object","additionalProperties":false,"properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"policyRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"preferenceEnabled":{"type":"boolean"},"override":{"type":"string","enum":["inherit","off"]},"adoption":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["missing","accepted","outdated","revoked"]},"requiredDisclosureVersion":{"type":"string","enum":["sbom-scan-osv-v2"]},"scope":{"type":"string","enum":["eligible-existing-and-future",null],"nullable":true},"acceptedAt":{"type":"string","format":"date-time","nullable":true}},"required":["status","requiredDisclosureVersion","scope","acceptedAt"]},"policyGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"documentGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"effectiveGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"effectiveEnabled":{"type":"boolean"},"blockers":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["team-off","document-off","adoption-required","disclosure-outdated","adoption-revoked","rollout-disabled","eligibility-not-assessed","ineligible"]}},"eligibility":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["not-assessed","eligible","ineligible"]}},"required":["status"]}},"required":["revision","policyRevision","preferenceEnabled","override","adoption","policyGeneration","documentGeneration","effectiveGeneration","effectiveEnabled","blockers","eligibility"]}},"required":["projectId","documentId","changed","settings"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Expected document or policy revision changed. Reload settings before reconciling."},"429":{"description":"Settings generation capacity or normal service-write limit reached."}}}},"/api/v1/projects/{projectId}/documents/{documentId}/vulnerability-scan/history":{"get":{"summary":"Read bounded reported scan history under the original document-read credential and final native source/outcome/retention fences. Explicit provenance and incomplete coverage; missing proofs are withheld, never clean/no-scans. Read-only metadata with no provider or processing activation.","tags":["Security"],"operationId":"getApiV1ProjectsProjectIdDocumentsDocumentIdVulnerabilityScanHistory","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"documentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"description":"Bounded newest-first reported history page."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"description":"Use the prior page cursor unchanged. It is withheld when its endpoint lacks current native disclosure proof."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Original-authority fenced metadata. Counts require matching durable success; missing/partial coverage stays explicit. Source-only status is Worker-reported, not current execution proof. Catalog retention does not promise body availability.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128},"documentId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128},"currentVersionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128,"nullable":true},"runs":{"type":"array","maxItems":50,"items":{"type":"object","additionalProperties":false,"properties":{"run":{"type":"object","additionalProperties":false,"properties":{"runId":{"type":"string","format":"uuid","maxLength":36},"documentId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128},"state":{"type":"string","enum":["queued","running","succeeded","failed","cancelled","superseded"]},"result":{"type":"string","enum":["baseline","changed","unchanged",null],"nullable":true},"reason":{"type":"string","enum":["provider-unavailable","provider-invalid-response","provider-record-unsupported","provider-circuit-open","budget-exhausted","stale-lease","internal","gateway-off","disabled","consent-changed","not-found","not-active","team-inactive","plan","not-sbom","spec-version-unsupported","protected","endpoint-source","signed","unreadable","unchanged-author-content","too-large",null],"nullable":true},"trigger":{"type":"string","enum":["nightly"]},"window":{"type":"string","maxLength":16},"queuedAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time","nullable":true},"completedAt":{"type":"string","format":"date-time","nullable":true},"observedAt":{"type":"string","format":"date-time","nullable":true},"baseVersionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128,"nullable":true},"resultVersionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128,"nullable":true},"summary":{"type":"object","additionalProperties":false,"properties":{"baseline":{"type":"boolean"},"observedAt":{"type":"string","format":"date-time"},"provider":{"type":"string","enum":["osv"]},"scannerVersion":{"type":"string","pattern":"^\\d{1,4}\\.\\d{1,4}\\.\\d{1,4}$"},"coverage":{"type":"object","additionalProperties":false,"properties":{"occurrences":{"type":"integer","minimum":0,"maximum":1000000},"identities":{"type":"integer","minimum":0,"maximum":1000000},"assessed":{"type":"integer","minimum":0,"maximum":1000000},"excluded":{"type":"object","additionalProperties":false,"properties":{"no-version":{"type":"integer","minimum":0,"maximum":1000000},"no-purl-no-ecosystem":{"type":"integer","minimum":0,"maximum":1000000},"unsupported-ecosystem":{"type":"integer","minimum":0,"maximum":1000000},"private":{"type":"integer","minimum":0,"maximum":1000000},"invalid-purl":{"type":"integer","minimum":0,"maximum":1000000},"version-range":{"type":"integer","minimum":0,"maximum":1000000},"no-ref":{"type":"integer","minimum":0,"maximum":1000000},"licence-excluded-ecosystem":{"type":"integer","minimum":0,"maximum":1000000}},"required":[]}},"required":["occurrences","identities","assessed","excluded"]},"current":{"type":"object","additionalProperties":false,"properties":{"critical":{"type":"integer","minimum":0,"maximum":1000000},"high":{"type":"integer","minimum":0,"maximum":1000000},"medium":{"type":"integer","minimum":0,"maximum":1000000},"low":{"type":"integer","minimum":0,"maximum":1000000},"other":{"type":"integer","minimum":0,"maximum":1000000},"unknown":{"type":"integer","minimum":0,"maximum":1000000}},"required":["critical","high","medium","low","other","unknown"]},"affectedComponents":{"type":"integer","minimum":0,"maximum":1000000},"changes":{"type":"object","additionalProperties":false,"properties":{"new":{"type":"integer","minimum":0,"maximum":1000000},"unchanged":{"type":"integer","minimum":0,"maximum":1000000},"severityChanged":{"type":"integer","minimum":0,"maximum":1000000},"idChanged":{"type":"integer","minimum":0,"maximum":1000000},"noLongerDetected":{"type":"integer","minimum":0,"maximum":1000000},"componentRemoved":{"type":"integer","minimum":0,"maximum":1000000}},"required":["new","unchanged","severityChanged","idChanged","noLongerDetected","componentRemoved"]},"newBySeverity":{"type":"object","additionalProperties":false,"properties":{"critical":{"type":"integer","minimum":0,"maximum":1000000},"high":{"type":"integer","minimum":0,"maximum":1000000},"medium":{"type":"integer","minimum":0,"maximum":1000000},"low":{"type":"integer","minimum":0,"maximum":1000000},"other":{"type":"integer","minimum":0,"maximum":1000000},"unknown":{"type":"integer","minimum":0,"maximum":1000000}},"required":["critical","high","medium","low","other","unknown"]},"noLongerDetectedBySeverity":{"type":"object","additionalProperties":false,"properties":{"critical":{"type":"integer","minimum":0,"maximum":1000000},"high":{"type":"integer","minimum":0,"maximum":1000000},"medium":{"type":"integer","minimum":0,"maximum":1000000},"low":{"type":"integer","minimum":0,"maximum":1000000},"other":{"type":"integer","minimum":0,"maximum":1000000},"unknown":{"type":"integer","minimum":0,"maximum":1000000}},"required":["critical","high","medium","low","other","unknown"]}},"required":["baseline","observedAt","provider","scannerVersion","coverage","current","affectedComponents","changes","newBySeverity","noLongerDetectedBySeverity"],"nullable":true}},"required":["runId","documentId","state","result","reason","trigger","window","queuedAt","startedAt","completedAt","observedAt","baseVersionId","resultVersionId","summary"]},"provenance":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","enum":["mdlogic-scanner"]},"sourceBinding":{"type":"string","enum":["retained-version","current-source"]},"outcomeBinding":{"type":"string","enum":["durable-success","durable-failure","source-only"]},"sourceVersionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","maxLength":128,"nullable":true},"currentSource":{"type":"boolean"}},"required":["source","sourceBinding","outcomeBinding","sourceVersionId","currentSource"]}},"required":["run","provenance"]}},"cursor":{"type":"string","nullable":true,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+$"},"incomplete":{"type":"boolean","description":"Rows without current native source/outcome/retention evidence were withheld. This is never a clean or empty-history claim; no withheld count is disclosed."}},"required":["projectId","documentId","currentVersionId","runs","cursor","incomplete"]}}}},"400":{"description":"Unknown/duplicate query field or malformed pagination."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"500":{"description":"History binding, verified response or current native disclosure scope is unavailable; never interpreted as no scans."}}}},"/api/v1/projects/{projectId}/documents/from-template":{"post":{"summary":"Compose a new document from a content template, filling its placeholders. Refuses to overwrite an existing document.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdDocumentsFromTemplate","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/email-watch":{"get":{"summary":"Read personal daily change-only watch and preference/delivery block. Current project membership and personal account credential required.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdEmailWatch","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Set personal project watch with enabled boolean and expected generation. Refuses optional email disabled, provider suppression or unavailable setup, with account preferences link. Does not enable preferences. Current active membership and account required; starts fresh without backlog.","tags":["Projects"],"operationId":"putApiV1ProjectsProjectIdEmailWatch","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/folders":{"get":{"summary":"The project’s folder tree.","tags":["Folders"],"operationId":"getApiV1ProjectsProjectIdFolders","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a folder under a parent path.","tags":["Folders"],"operationId":"postApiV1ProjectsProjectIdFolders","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/folders/{folderId}":{"delete":{"summary":"Delete a folder (?recursive=true to take its contents).","tags":["Folders"],"operationId":"deleteApiV1ProjectsProjectIdFoldersFolderId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"folderId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Rename or move a folder; descendant paths follow. Refused with 409 when a folder or document already has the final path ignoring letter case (`details.reason` is `duplicate-name` or `path-taken`, and `details.existing` names it). The team must be active: a suspended team is refused with 402 PAYMENT_REQUIRED and a blocked one with 403 UNAUTHORIZED.","tags":["Folders"],"operationId":"patchApiV1ProjectsProjectIdFoldersFolderId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"folderId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/git-url":{"post":{"summary":"Reveal the project's git clone URL, allocating its namespace and slug on first call. Idempotent.","tags":["Renders"],"operationId":"postApiV1ProjectsProjectIdGitUrl","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/imports":{"post":{"summary":"Import one Word, OpenDocument, spreadsheet or PDF file as a Markdown document. The body is the raw file; `filename` (required) names it, `folderPath` places it (missing folders are created) and `name` overrides the document name. A taken default name gets the next free `-2` to `-20` suffix, an identical file already there is a 200 no-op, and a taken explicit `name` is a 409. The response names the final document and lists conversion warnings. Needs the document-import capability (every paid plan and Open Source); without it the call is refused with 403 PLAN_RESTRICTION before the body is read. The file may be at most 10 MB.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdImports","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/offline-context":{"get":{"summary":"Read project settings, variables, style and owned style image metadata for a complete offline snapshot.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdOfflineContext","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Current project settings, project variables, same-team style and style image metadata. Fingerprint changes with context dependencies; source/folder inventory and document variables are separate reads. No bytes/history/unrelated Library assets are included.","headers":{"Cache-Control":{"schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["version","project","variables","template","assets","fingerprint"],"properties":{"version":{"type":"integer","enum":[1]},"project":{"type":"object","required":["id","teamId","name","status","mode","timezone","locale","substitutionEnabled","settings","templateId"],"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active"]},"mode":{"type":"string","enum":["document"]},"timezone":{"type":"string"},"locale":{"type":"string"},"substitutionEnabled":{"type":"boolean"},"settings":{"type":"object","additionalProperties":true},"templateId":{"type":"string","nullable":true}},"additionalProperties":true},"variables":{"type":"object","additionalProperties":false,"required":["variables","reserved"],"properties":{"variables":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["name","value","description","scope","updatedAt"],"properties":{"name":{"type":"string"},"value":{"type":"string"},"description":{"type":"string","nullable":true},"scope":{"type":"string","enum":["project"]},"updatedAt":{"type":"string","format":"date-time"}}}},"reserved":{"type":"array","items":{"type":"string"}}}},"template":{"type":"object","nullable":true,"required":["id","teamId","name","kind","headerImageAssetId","watermarkAssetId"],"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["basic","advanced"]},"headerImageAssetId":{"type":"string","nullable":true},"watermarkAssetId":{"type":"string","nullable":true}},"additionalProperties":true},"assets":{"type":"array","maxItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","teamId","mediaType","byteSize","contentHash"],"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"mediaType":{"type":"string","enum":["image/png","image/jpeg"]},"byteSize":{"type":"integer","minimum":1,"maximum":2000000},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}}}},"fingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"CONFLICT: a required referenced image is unavailable or invalid. Do not mark the offline snapshot complete."},"429":{"description":"LIMIT_EXCEEDED with details.reason offline-context-limit: the complete serialized context, including fingerprint and envelope, exceeds 2000000 UTF-8 bytes. Retain the previous snapshot and report this download incomplete; retry only after reducing required context."}}}},"/api/v1/projects/{projectId}/page-imports":{"get":{"summary":"Read the team monthly page-import allowance and current reservations through a project. usage is null for project-restricted credentials to suppress team-wide telemetry. No source is retrieved.","tags":["Documents"],"operationId":"getApiV1ProjectsProjectIdPageImports","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Team monthly usage and reservations, or null for a project-restricted credential; no page retrieval.","content":{"application/json":{"schema":{"type":"object","properties":{"usage":{"type":"object","properties":{"used":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"resetsAt":{"type":"string","format":"date-time"}},"required":["used","reserved","limit","resetsAt"],"additionalProperties":false,"nullable":true,"description":"Project-restricted credentials receive null to suppress team-wide page-import usage and reservations. Other credentials retain the team monthly allowance."}},"required":["usage"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Retrieve one public HTTPS page with JavaScript support as an editable Markdown snapshot candidate. Navigation and advertisements are removed where extraction is reliable. No crawling, sign-in, paywall bypass or monitoring. Returns untrusted source content for review, source provenance, expiry and team usage (null for project-restricted credentials); saves no document. Server-enforced monthly quota, 24-hour source cooldown, bounded attempts and in-flight deduplication apply across every client.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdPageImports","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2000,"description":"One public HTTPS page. No authentication, crawling or paywall bypass."},"requestId":{"type":"string","format":"uuid","description":"Client-generated UUID. Replay the same requestId after an uncertain response; this does not bypass quota or cooldown."}},"required":["url","requestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Retrieved snapshot candidate for review; no document is created.","content":{"application/json":{"schema":{"type":"object","properties":{"preview":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string","description":"Untrusted Markdown for editable review; at most 1 MB UTF-8. Does not replace a saved document."},"title":{"type":"string"},"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"canonicalUrl":{"type":"string","nullable":true},"retrievedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","nullable":true},"expectedRevision":{"type":"string","nullable":true},"warnings":{"type":"array","items":{"type":"string"}}},"required":["id","content","title","requestedUrl","finalUrl","retrievedAt","expiresAt","warnings"],"additionalProperties":false},"usage":{"type":"object","properties":{"used":{"type":"integer","minimum":0},"reserved":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":0},"resetsAt":{"type":"string","format":"date-time"}},"required":["used","reserved","limit","resetsAt"],"additionalProperties":false,"nullable":true,"description":"Project-restricted credentials receive null to suppress team-wide page-import usage and reservations. Other credentials retain the team monthly allowance."}},"required":["preview","usage"],"additionalProperties":false}}}},"400":{"description":"INVALID_REQUEST: public HTTPS single URL only. Credentials, private/internal targets and unsupported responses are refused."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"CONFLICT. details.reason page-cooldown includes retryAt; page-in-flight and page-retry-later refuse duplicate or too-frequent attempts. Cooldown and deduplication are enforced across UI, API, CLI and MCP."},"429":{"description":"LIMIT_EXCEEDED. details.reason page-monthly-limit or attempt/global-abuse limits. A failed extraction does not consume the monthly allowance; bounded retry controls still apply."},"502":{"description":"UPSTREAM_ERROR with details.reason page-extraction-uncertain. No candidate is saved and the current document is preserved. Do not retry automatically."},"503":{"description":"CONFIG with details.reason page-unavailable. Page import is disabled or its renderer is unavailable."}}}},"/api/v1/projects/{projectId}/page-imports/{previewId}/save":{"post":{"summary":"Save explicitly reviewed candidate Markdown with its source provenance. create makes a new document; replace requires expectedId and expectedRevision from the reviewed current document. Rechecks membership, role, active source/project, destination, existing document quota and revision transactionally. Never silently overwrites edits, protected endpoint sources or archived documents. Expired previews and stale revisions are refused.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdPageImportsPreviewIdSave","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"previewId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":1000000,"description":"Explicitly reviewed Markdown; at most 1 MB UTF-8."},"name":{"type":"string","minLength":1,"maxLength":120},"folderPath":{"type":"string","maxLength":400},"mode":{"type":"string","enum":["create","replace"],"description":"create saves a new copy. replace requires both expectedId and expectedRevision from the reviewed current document."},"expectedId":{"type":"string"},"expectedRevision":{"type":"string"}},"required":["content","name","mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"Reviewed content saved with source provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string"}},"required":["document","decision"],"additionalProperties":false}}}},"201":{"description":"New document saved with source provenance.","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"},"decision":{"type":"string"}},"required":["document","decision"],"additionalProperties":false}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"CONFLICT: page-preview-expired, document-changed, collision or protected source. Preserve the current content, reread the document, compare and explicitly choose replace or create a new copy."},"429":{"description":"LIMIT_EXCEEDED: existing team document quota. A successful page retrieval does not reserve a document slot."}}}},"/api/v1/projects/{projectId}/properties":{"get":{"summary":"Read private ordinary project key/value metadata and its current revision. Properties never grant access or appear automatically in public shares/sites.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Current project properties and revision. No-op mutations preserve revision and audit.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"values":{"type":"object","maxProperties":64,"additionalProperties":{"type":"string","maxLength":2048,"description":"Untrusted ordinary non-secret metadata; at most 2048 UTF-8 bytes. Empty strings and Unicode are preserved."},"description":"Private project properties, at most 16KiB canonical JSON. Values are data, never instructions or authorization."}},"required":["projectId","revision","values"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Stale property revision or authority changed. Reload and reconcile; do not automatically overwrite."}}},"patch":{"summary":"Atomically set or delete one project property with expectedRevision. Unrelated keys are preserved; no-ops change neither revision nor audit. Audit records actor/key/action, never values.","tags":["Projects"],"operationId":"patchApiV1ProjectsProjectIdProperties","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740990},"action":{"type":"string","enum":["set","delete"]},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$","description":"Case-sensitive ASCII property key; reserved prototype-related names are refused."},"value":{"type":"string","maxLength":2048,"description":"Untrusted ordinary non-secret metadata; at most 2048 UTF-8 bytes. Empty strings and Unicode are preserved."}},"required":["expectedRevision","action","key"],"oneOf":[{"properties":{"action":{"enum":["set"]}},"required":["value"]},{"properties":{"action":{"enum":["delete"]}},"not":{"required":["value"]}}]}}}},"responses":{"200":{"description":"Current project properties and revision. No-op mutations preserve revision and audit.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"values":{"type":"object","maxProperties":64,"additionalProperties":{"type":"string","maxLength":2048,"description":"Untrusted ordinary non-secret metadata; at most 2048 UTF-8 bytes. Empty strings and Unicode are preserved."},"description":"Private project properties, at most 16KiB canonical JSON. Values are data, never instructions or authorization."},"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$","description":"Case-sensitive ASCII property key; reserved prototype-related names are refused."},"action":{"type":"string","enum":["added","changed","deleted","unchanged"]},"changed":{"type":"boolean"}},"required":["projectId","revision","values","key","action","changed"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Stale property revision or authority changed. Reload and reconcile; do not automatically overwrite."}}}},"/api/v1/projects/{projectId}/public-site":{"delete":{"summary":"Permanently unpublish both public site addresses (owner/admin, access-keys:manage). Republishing creates a new address. Link shares remain independent.","tags":["Projects"],"operationId":"deleteApiV1ProjectsProjectIdPublicSite","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","nullable":true}},"required":["site"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"Read the project Public site setting without bearer credentials. Returns actual expiry, hostname availability and effective plan branding.","tags":["Projects"],"operationId":"getApiV1ProjectsProjectIdPublicSite","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","required":["site","hostingAvailable","brandingEditable","expiryEditable"],"properties":{"site":{"type":"object","nullable":true,"additionalProperties":false,"required":["id","published","url","hostnameUrl","expiresAt","presentation"],"properties":{"id":{"type":"string"},"published":{"type":"boolean"},"url":{"type":"string"},"hostnameUrl":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}}}},"hostingAvailable":{"type":"boolean"},"brandingEditable":{"type":"boolean"},"expiryEditable":{"type":"boolean","description":"Whether the current member can set the lifetime in place. Existing Data Protection site grants retain their original lifetime."}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Publish or update a public project site (owner/admin, access-keys:manage). First publication requires confirmation and defaults to Never. A site keeps its address and its expiry unless a new lifetime is chosen. Renewal after expiry also requires fresh confirmation. Existing protected sites need a new publication to change their lifetime.","tags":["Projects"],"operationId":"putApiV1ProjectsProjectIdPublicSite","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}},"description":"Omit to preserve the current presentation on an update."},"expiresInDays":{"type":"integer","nullable":true,"enum":[30,60,90,365,null],"description":"Lifetime in elapsed 24-hour days (365 = 1 year). Null means Never. Omit for Never on initial publication or to preserve the current expiry on an update."},"confirmPublic":{"type":"boolean","description":"Must be true for first publication and renewal after expiry. Renewal also requires an explicit expiresInDays. Active and future documents become public."}}}}}},"responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","nullable":true,"additionalProperties":false,"required":["id","published","url","hostnameUrl","expiresAt","presentation"],"properties":{"id":{"type":"string"},"published":{"type":"boolean"},"url":{"type":"string"},"hostnameUrl":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}}}}},"required":["site"]}}}},"201":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"object","nullable":true,"additionalProperties":false,"required":["id","published","url","hostnameUrl","expiresAt","presentation"],"properties":{"id":{"type":"string"},"published":{"type":"boolean"},"url":{"type":"string"},"hostnameUrl":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}}}}},"required":["site"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/public-site/preview":{"post":{"summary":"Authenticated owner/admin preview of current project documents, policy and effective branding. Creates no share or audience.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdPublicSitePreview","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/publications":{"get":{"summary":"List snapshots and semantic releases (?kind=snapshot|release).","tags":["Releases"],"operationId":"getApiV1ProjectsProjectIdPublications","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"releases:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a snapshot, or a semantic release (software-mode projects). A release freezes each document against the version row it was published from, and stamps that version on the document.","tags":["Releases"],"operationId":"postApiV1ProjectsProjectIdPublications","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/publications/{publicationId}":{"get":{"summary":"One publication with its artifact set; each entry reports whether its frozen content can be read back.","tags":["Releases"],"operationId":"getApiV1ProjectsProjectIdPublicationsPublicationId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"publicationId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"releases:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/publications/{publicationId}/artifacts/{logicalName}":{"get":{"summary":"A release’s FROZEN source for one document: the bytes as published, not the document as it stands now.","tags":["Releases"],"operationId":"getApiV1ProjectsProjectIdPublicationsPublicationIdArtifactsLogicalName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"publicationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/publications/{publicationId}/artifacts/{logicalName}/renders/{format}":{"get":{"summary":"A render of a release’s frozen bytes: pdf, docx, html, epub or md (Markdown snapshot; `?variables=raw|resolved`). %DOC_VERSION% and %GIT_*% resolve from the publication’s own version and CI context.","tags":["Releases"],"operationId":"getApiV1ProjectsProjectIdPublicationsPublicationIdArtifactsLogicalNameRendersFormat}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"publicationId","in":"path","required":true,"schema":{"type":"string"}},{"name":"logicalName","in":"path","required":true,"schema":{"type":"string"},"description":"The document’s FULL path, percent-encoded into this one segment (e.g. `guides%2Fapi%2Fauth.md`)."},{"name":"format","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/releases/latest":{"get":{"summary":"The highest semantic release of the project.","tags":["Releases"],"operationId":"getApiV1ProjectsProjectIdReleasesLatest","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"releases:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/restore":{"post":{"summary":"Restore an archived project, and only the documents its archive took.","tags":["Projects"],"operationId":"postApiV1ProjectsProjectIdRestore","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/search":{"get":{"summary":"The same search as `GET /teams/{teamId}/search`, scoped to one project. The owning team is resolved from the project; a project belonging to another team answers exactly as an unknown project id does.","tags":["Search"],"operationId":"getApiV1ProjectsProjectIdSearch","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Results, and the index status block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/projects/{projectId}/search/suggest":{"get":{"summary":"The same type-ahead as `GET /teams/{teamId}/search/suggest`, scoped to one project.","tags":["Search"],"operationId":"getApiV1ProjectsProjectIdSearchSuggest","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Type-ahead suggestions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuggestions"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/projects/{projectId}/sensitive-documents":{"get":{"summary":"The documents in a project whose content is potentially sensitive (security plans, assessments, plans of action and milestones, vulnerability and incident reports), for a warning before a project link is created. Checks at most 200 documents and 32 MB of content, and never fails on a document it cannot read: `unreadable` counts those, and `truncated` is true whenever `scanned` is less than `total`, for any reason. `blockedByPolicy` is computed only when the scan found a document or was cut short (`truncated`): it is then true when the owning team blocks sharing of sensitive documents (such documents are withheld from project links), and also when the policy cannot be read. Otherwise it is false.","tags":["Shares"],"operationId":"getApiV1ProjectsProjectIdSensitiveDocuments","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/share":{"post":{"summary":"Create a project-wide share link. Every call creates an ADDITIONAL live link. It never replaces or revokes the previous one, which stays usable until it is revoked or expires. The response carries `sensitiveContent: { documents: n }` when n documents in the project hold potentially sensitive content (see GET /api/v1/projects/{projectId}/sensitive-documents); pass `acknowledgeSensitive: true` to record that the person creating the link was warned. The warning never blocks the link, and neither does a document that could not be checked.","tags":["Shares"],"operationId":"postApiV1ProjectsProjectIdShare","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}},"acknowledgeSensitive":{"type":"boolean"},"expiresInDays":{"type":"integer","nullable":true,"enum":[30,60,90,365,null],"description":"Lifetime in elapsed 24-hour days (365 = 1 year). Omit for 30 days; null means Never. Never links remain revocable and obey team sharing policy."}},"additionalProperties":false}}}},"responses":{"201":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","required":["id","projectId","kind","token","url","presentation","expiresAt","revokedAt","hostnameUrl"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["project"]},"token":{"type":"string","description":"Bearer proof. Never place in DNS."},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"publicAlias":{"type":"string","nullable":true,"description":"Opaque locator; this link still requires its bearer proof."},"brandingEditable":{"type":"boolean"},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}},"hostnameUrl":{"type":"string","nullable":true,"description":"Proof URL returned only in an activated hostname environment. Establishes a host-only cookie then redirects to the viewer root."}}}},"required":["share"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/share/preview":{"post":{"summary":"Preview a project share presentation without creating a public link. Requires shares.create and current project membership. Returns actual public index HTML using current documents and sharing policy.","tags":["Shares"],"operationId":"postApiV1ProjectsProjectIdSharePreview","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"html":{"type":"string","description":"Actual index HTML; no public link is created."}},"required":["html"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/shares/project":{"get":{"summary":"Every project-wide share link for the project, newest first. Revoked and expired links stay listed, with their revokedAt/expiresAt, so a link that was handed out can still be accounted for.","tags":["Shares"],"operationId":"getApiV1ProjectsProjectIdSharesProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"shares":{"type":"array","items":{"type":"object","required":["id","projectId","kind","token","url","presentation","expiresAt","revokedAt","hostnameUrl"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["project"]},"token":{"type":"string","description":"Bearer proof. Never place in DNS."},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"publicAlias":{"type":"string","nullable":true,"description":"Opaque locator; this link still requires its bearer proof."},"brandingEditable":{"type":"boolean"},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}},"hostnameUrl":{"type":"string","nullable":true,"description":"Proof URL returned only in an activated hostname environment. Establishes a host-only cookie then redirects to the viewer root."}}}}},"required":["shares"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/shares/project/{shareId}":{"patch":{"summary":"Update the template, Library logo, colors and plain-text welcome of a live project share. Requires shares.revoke. Retains addresses, expiry and access rules.","tags":["Shares"],"operationId":"patchApiV1ProjectsProjectIdSharesProjectShareId}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"description":"presentation replaces all settings. presentationPatch changes only supplied basic settings and preserves stored logo/branding choices. Send at most one.","properties":{"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}},"presentationPatch":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"]},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$"},"welcome":{"type":"string","maxLength":500}}}},"not":{"required":["presentation","presentationPatch"]}}}}},"responses":{"200":{"description":"Project share presentation.","content":{"application/json":{"schema":{"type":"object","properties":{"share":{"type":"object","required":["id","projectId","kind","token","url","presentation","expiresAt","revokedAt","hostnameUrl"],"properties":{"id":{"type":"string"},"projectId":{"type":"string"},"kind":{"type":"string","enum":["project"]},"token":{"type":"string","description":"Bearer proof. Never place in DNS."},"url":{"type":"string","format":"uri"},"createdAt":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"revokedAt":{"type":"string","nullable":true},"publicAlias":{"type":"string","nullable":true,"description":"Opaque locator; this link still requires its bearer proof."},"brandingEditable":{"type":"boolean"},"presentation":{"type":"object","additionalProperties":false,"properties":{"template":{"type":"string","enum":["file-library","support-site"],"default":"file-library"},"logoAssetId":{"type":"string","nullable":true,"maxLength":80,"description":"PNG/JPEG image from this project’s team Library. No external URL."},"accentColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#174ea6"},"backgroundColor":{"type":"string","pattern":"^#[a-fA-F0-9]{6}$","default":"#f5f6f8"},"showMdlBranding":{"type":"boolean","default":true,"description":"Visible MDL credit; Free must keep enabled."},"showMdlBacklink":{"type":"boolean","default":true,"description":"MDL website link; Free must keep enabled."},"footerText":{"type":"string","maxLength":200,"default":"","description":"Plain text; advanced-sharing required for custom footer."},"welcome":{"type":"string","maxLength":500,"default":"","description":"Plain text; HTML is escaped."}}},"hostnameUrl":{"type":"string","nullable":true,"description":"Proof URL returned only in an activated hostname environment. Establishes a host-only cookie then redirects to the viewer root."}}}},"required":["share"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/variables":{"delete":{"summary":"Delete every project-scope variable.","tags":["Variables"],"operationId":"deleteApiV1ProjectsProjectIdVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"Project-scope variables, plus the reserved built-in names.","tags":["Variables"],"operationId":"getApiV1ProjectsProjectIdVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Replace the project-scope variable set.","tags":["Variables"],"operationId":"putApiV1ProjectsProjectIdVariables","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/variables/{name}":{"delete":{"summary":"Delete one project-scope variable.","tags":["Variables"],"operationId":"deleteApiV1ProjectsProjectIdVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One project-scope variable.","tags":["Variables"],"operationId":"getApiV1ProjectsProjectIdVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Create or update one project-scope variable.","tags":["Variables"],"operationId":"putApiV1ProjectsProjectIdVariablesName}","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/projects/{projectId}/zip-import/items":{"post":{"summary":"Commit one reviewed ZIP item. Directories create real folders and report any partially created parents. Documents require an existing parent folder, are create-only by default, and explicit replacement requires expectedId and expectedRevision. Repeats tenant, role, active team/project, path, 1 MB UTF-8 content, structured format, quota and transactional source/revision guards. Endpoint-managed and archived targets are protected. Outcomes and audit warnings describe committed state; lost responses require a fresh preview before retry.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdZipImportItems","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["kind","path"],"properties":{"kind":{"type":"string","enum":["document","directory"]},"path":{"type":"string","minLength":1,"maxLength":400,"description":"Final project path; existing 10-level ASCII path grammar. Directory paths must leave room for a document."},"content":{"type":"string","description":"Required for documents: nonempty UTF-8, at most 1,000,000 encoded bytes. No binary controls."},"action":{"type":"string","enum":["create","replace"],"default":"create"},"expectedId":{"type":"string","description":"Required for replacement: current stable document ID."},"expectedRevision":{"type":"string","description":"Required for replacement: current opaque artifact state revision, not the display version."}}}}}},"responses":{"200":{"description":"Replacement or already-present item.","content":{"application/json":{"schema":{"type":"object","required":["outcome","path","warnings"],"properties":{"outcome":{"type":"string","enum":["created","replaced","already-present","failed"]},"path":{"type":"string"},"id":{"type":"string"},"revision":{"type":"string"},"createdFolders":{"type":"array","items":{"type":"string"},"description":"Folders actually created, including partial parents if this item failed. No rollback is implied."},"warnings":{"type":"array","items":{"type":"string"},"description":"audit-unconfirmed means the item committed but its audit acknowledgement is unconfirmed."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"201":{"description":"Created item.","content":{"application/json":{"schema":{"type":"object","required":["outcome","path","warnings"],"properties":{"outcome":{"type":"string","enum":["created","replaced","already-present","failed"]},"path":{"type":"string"},"id":{"type":"string"},"revision":{"type":"string"},"createdFolders":{"type":"array","items":{"type":"string"},"description":"Folders actually created, including partial parents if this item failed. No rollback is implied."},"warnings":{"type":"array","items":{"type":"string"},"description":"audit-unconfirmed means the item committed but its audit acknowledgement is unconfirmed."},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"400":{"description":"Invalid path, text, structured format or field."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Collision, endpoint source ownership, archived state, changed replacement revision or missing parent. A folder failure can include createdFolders; review before retry."},"429":{"description":"LIMIT_EXCEEDED: the existing team document quota refused a new document. No implicit parent folders are created by document commits."}}}},"/api/v1/projects/{projectId}/zip-import/preview":{"post":{"summary":"Read-only preview of one ZIP document or directory destination. Requires write authority but creates nothing. Returns content-selected format, missing parent folders, collision disposition and current stable ID/revision. ZIP bytes remain in the client; invalid asserted structured content is refused. Preview reserves no destination.","tags":["Documents"],"operationId":"postApiV1ProjectsProjectIdZipImportPreview","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["kind","path"],"properties":{"kind":{"type":"string","enum":["document","directory"]},"path":{"type":"string","minLength":1,"maxLength":400,"description":"Final project path; existing 10-level ASCII path grammar. Directory paths must leave room for a document."},"content":{"type":"string","description":"Required for documents: nonempty UTF-8, at most 1,000,000 encoded bytes. No binary controls."},"action":{"type":"string","enum":["create","replace"],"default":"create"},"expectedId":{"type":"string","description":"Required for replacement: current stable document ID."},"expectedRevision":{"type":"string","description":"Required for replacement: current opaque artifact state revision, not the display version."}}}}}},"responses":{"200":{"description":"Read-only review; no reservation or mutation.","content":{"application/json":{"schema":{"type":"object","required":["kind","path","disposition","missingFolders"],"properties":{"kind":{"type":"string","enum":["document","directory"]},"path":{"type":"string"},"disposition":{"type":"string","enum":["create","identical","replaceable","blocked"]},"reason":{"type":"string"},"missingFolders":{"type":"array","items":{"type":"string"}},"sourceFormat":{"type":"string"},"contentHash":{"type":"string"},"existing":{"type":"object","required":["id","revision","status","contentHash","sourceFormat"],"properties":{"id":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string"},"contentHash":{"type":"string"},"sourceFormat":{"type":"string"}}}}}}}},"400":{"description":"Invalid path, text, structured format or field."},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Collision, endpoint source ownership, archived state, changed replacement revision or missing parent. A folder failure can include createdFolders; review before retry."},"429":{"description":"LIMIT_EXCEEDED: the existing team document quota refused a new document. No implicit parent folders are created by document commits."}}}},"/api/v1/shares/{shareId}/revoke":{"post":{"summary":"Revoke a share link.","tags":["Shares"],"operationId":"postApiV1SharesShareIdRevoke","parameters":[{"name":"shareId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/shares/availability":{"get":{"summary":"Whether a custom share name is free within the team’s namespace.","tags":["Shares"],"operationId":"getApiV1SharesAvailability","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/summary":{"get":{"summary":"Dashboard roll-up for the current account: teams, projects, recent activity.","tags":["Account"],"operationId":"getApiV1Summary","parameters":[],"security":[],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"404":{"description":"Not found"}}}},"/api/v1/team-archives/{archiveId}/download":{"get":{"summary":"Download a deleted team’s document archive as a ZIP. Available only to accounts that were owner or admin at the moment of deletion, snapshotted then (memberships no longer exist to check), and only until the archive expires seven days after deletion. A bad id, an expired archive and an ineligible caller all answer identically: NOT_FOUND.","tags":["Teams"],"operationId":"getApiV1TeamArchivesArchiveIdDownload","parameters":[{"name":"archiveId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams":{"get":{"summary":"Teams the current account belongs to. The team is created once, at registration; there is no user-facing route to create another (see POST /api/v1/admin/teams).","tags":["Teams"],"operationId":"getApiV1Teams","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/agent-workspaces":{"post":{"summary":"Create or resume a Standard or Empty Agent Workspace with a stable idempotency key. Web console only.","tags":["Projects"],"operationId":"postApiV1TeamsTeamIdAgentWorkspaces","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/analytics":{"get":{"summary":"A team's activity over time: link opens, downloads, renders, publishes, integration health.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdAnalytics","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/assets":{"get":{"summary":"Images in a team Library.","tags":["Library"],"operationId":"getApiV1TeamsTeamIdAssets","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Upload an image to a team Library.","tags":["Library"],"operationId":"postApiV1TeamsTeamIdAssets","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/assets/{assetId}":{"delete":{"summary":"Delete a Library image. Refused if a template or share still uses it.","tags":["Library"],"operationId":"deleteApiV1TeamsTeamIdAssetsAssetId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One image in a team Library.","tags":["Library"],"operationId":"getApiV1TeamsTeamIdAssetsAssetId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/assets/{assetId}/content":{"get":{"summary":"The raw bytes of one Library image.","tags":["Library"],"operationId":"getApiV1TeamsTeamIdAssetsAssetIdContent","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/assets/{assetId}/offline-content":{"get":{"summary":"Read verified image metadata or a bounded hash-pinned chunk for protected offline storage.","tags":["Library"],"operationId":"getApiV1TeamsTeamIdAssetsAssetIdOfflineContent","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}},{"in":"query","name":"offset","schema":{"type":"integer","minimum":0,"default":0},"description":"Raw byte offset; zero for metadata-only reads. Must not exceed byteSize."},{"in":"query","name":"limit","schema":{"type":"integer","minimum":0,"maximum":262144,"default":0},"description":"At most 262144 raw bytes. Zero returns verified metadata with empty base64 and complete=false. Unknown/repeated controls are refused."},{"in":"query","name":"expectedHash","schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":"Current SHA-256 contentHash; required for every nonzero limit. Stale hashes return conflict. All reads reauthorize current access, including metadata-only reads."}],"x-required-scope":"documents:read","responses":{"200":{"description":"Verified bounded bytes from the exact owned image. Reassemble byte chunks and verify total SHA-256 and size before publication; responses are never HTTP cached.","headers":{"Cache-Control":{"schema":{"type":"string","enum":["no-store"]}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["version","asset","offset","base64","complete"],"properties":{"version":{"type":"integer","enum":[1]},"asset":{"type":"object","additionalProperties":false,"required":["id","teamId","mediaType","byteSize","contentHash"],"properties":{"id":{"type":"string"},"teamId":{"type":"string"},"mediaType":{"type":"string","enum":["image/png","image/jpeg"]},"byteSize":{"type":"integer","minimum":1,"maximum":2000000},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}}},"offset":{"type":"integer","minimum":0},"base64":{"type":"string","format":"byte","maxLength":349528},"complete":{"type":"boolean"}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"CONFLICT: expected digest, source bytes or asset/storage binding changed, or stored image is inadmissible. Refresh metadata and resume a new generation; no old-hash bytes are delivered."}}}},"/api/v1/teams/{teamId}/audit":{"get":{"summary":"Team activity log, newest first. Filter with `category` (comma-separated known categories; an unknown one is a 400) and `projectId`. Page with `before` + `beforeId`, or pass the returned `nextBefore` as `before`. Routine (debug-level) events, such as a connected app renewing its sign-in, are left out unless `includeRoutine=1`. Owners and admins see every member’s rows, including members’ sign-ins and security events as minimised copies (action, actor, time, outcome; no IP address, email address or client); other roles see their own. A document import is an `ARTIFACT_PUBLISHED` row whose metadata carries `importedFrom` (the source extension), `sourceFilename`, `sourceBytes`, `outputChars`, `warnings` and, when a numbered name was used, `nameAdjusted`.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdAudit","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/data-protection":{"get":{"summary":"Data Protection entitlement, current state and configured auth-review navigation for current tenant owners and administrators. Included on every paid plan and Open Source. A null state does not mean encryption is off; navigation never proves authorization or live private-service health.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdDataProtection","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Request exact-tenant auth setup review navigation with action setup. Requires a paid plan and configured private serving/conversion dependencies; missing dependencies return 503 DATA_PROTECTION_NOT_READY and Free returns 403 PLAN_RESTRICTION. The returned URL does not change settings, create keys or authorize migration. Auth independently verifies current native admin authority and fresh WebAuthn UV. Client-supplied approval/readiness fields are refused.","tags":["Teams"],"operationId":"postApiV1TeamsTeamIdDataProtection","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"type":"string","enum":["setup"]}}}}}},"responses":{"200":{"description":"Open exact-tenant auth setup review. This does not activate protection or prove passkey verification.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["setup","approvalRequired"],"properties":{"setup":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","format":"uri"}}},"approvalRequired":{"type":"boolean","enum":[true]}}}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"The current protection state or cooldown does not permit setup. No settings were changed."},"503":{"description":"Required private serving/conversion dependencies are not configured (CONFIG; details.reason DATA_PROTECTION_NOT_READY). No settings were changed."}}}},"/api/v1/teams/{teamId}/deletion-request":{"delete":{"summary":"Owner only. Cancel a pending team deletion. A no-op (still 200) when none is pending.","tags":["Teams"],"operationId":"deleteApiV1TeamsTeamIdDeletionRequest","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Owner only. Start a team-deletion grace window: 7 days for a team with other members, immediate (no window) for a solo team. Requesting again while one is already pending returns the same window rather than extending it.","tags":["Teams"],"operationId":"postApiV1TeamsTeamIdDeletionRequest","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/endpoints":{"get":{"summary":"Endpoints the team fetches documents from.","tags":["Endpoints"],"operationId":"getApiV1TeamsTeamIdEndpoints","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create an endpoint. The URL is checked against the outbound-fetch policy.","tags":["Endpoints"],"operationId":"postApiV1TeamsTeamIdEndpoints","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/endpoints/{endpointId}":{"delete":{"summary":"Delete an endpoint.","tags":["Endpoints"],"operationId":"deleteApiV1TeamsTeamIdEndpointsEndpointId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One endpoint and its most recent fetch.","tags":["Endpoints"],"operationId":"getApiV1TeamsTeamIdEndpointsEndpointId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Update an endpoint (URL, schedule, credentials).","tags":["Endpoints"],"operationId":"patchApiV1TeamsTeamIdEndpointsEndpointId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/endpoints/{endpointId}/fetches":{"get":{"summary":"Fetch history for an endpoint, with status and timing.","tags":["Endpoints"],"operationId":"getApiV1TeamsTeamIdEndpointsEndpointIdFetches","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/endpoints/{endpointId}/refresh":{"post":{"summary":"Fetch an endpoint now.","tags":["Endpoints"],"operationId":"postApiV1TeamsTeamIdEndpointsEndpointIdRefresh","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/invitations":{"get":{"summary":"Invitations this team has outstanding. Each one holds a collaborator seat until it is accepted, withdrawn, or expires; the invitation token is never returned.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdInvitations","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/invitations/{email}":{"delete":{"summary":"Withdraw an outstanding invitation and release the collaborator seat it holds. Addressed by the invited email; an invitation that was already accepted is not outstanding and the membership it created is untouched.","tags":["Teams"],"operationId":"deleteApiV1TeamsTeamIdInvitationsEmail}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/mail/issues":{"get":{"summary":"Read-only owner/admin delivery issues or deferred notices. Latest notice per recipient/purpose, seven-day created window, snapshot/keyset paging and current safe outcomes. No recipient identity keys, provider IDs or suppression history; cursors expire after fifteen minutes.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdMailIssues","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/mail/issues/{issueId}":{"get":{"summary":"Fresh tenant/purpose/window-scoped safe notice detail and at most five submission attempts. Current-member name or unavailable recipient context with masked domain. No message bodies, auth links, raw provider data, global policy or resend/recovery controls.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdMailIssuesIssueId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"issueId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/mail/summary":{"get":{"summary":"Owner/admin count of current latest team-email issues and separate deferrals for notices created in the last seven days. Safe tenant scope; recording/retention coverage is separate from zero. No personal account mail or global recipient policy.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdMailSummary","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/members":{"get":{"summary":"List team members and their roles.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdMembers","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Invite somebody to the team. An existing account is invited, never added silently, and never above the inviter’s own role.","tags":["Teams"],"operationId":"postApiV1TeamsTeamIdMembers","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/members/{userId}":{"delete":{"summary":"Remove a member. The last owner cannot be removed.","tags":["Teams"],"operationId":"deleteApiV1TeamsTeamIdMembersUserId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Change a member’s role. The last owner cannot be demoted.","tags":["Teams"],"operationId":"patchApiV1TeamsTeamIdMembersUserId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/open-source-application":{"get":{"summary":"Owner/admin current team Open Source application. Status includes submitted, awaiting_billing, active, rejected and derived expired/ended. No applicant identity or provider IDs.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdOpenSourceApplication","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Submit team Open Source eligibility for manual review. Requires owner/admin and access-keys:manage. Strict 8 KiB JSON: submissionKey UUID, public HTTPS repositoryUrl <=2048, description <=1000, OSI license <=100, relationship <=300, eligibilityConfirmed:true. URL is never fetched. Same-key retries return current state; one open application/team, 24-hour resubmission cooldown and account rate limit.","tags":["Teams"],"operationId":"postApiV1TeamsTeamIdOpenSourceApplication","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/projects":{"get":{"summary":"List the team’s projects. With includeWorkspaceType=1, the web and registered native apps can identify ready workspaces the signed-in person may read.","tags":["Projects"],"operationId":"getApiV1TeamsTeamIdProjects","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a project (mode: document or software). Consumes a plan slot.","tags":["Projects"],"operationId":"postApiV1TeamsTeamIdProjects","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"sensitive":{"type":"boolean","default":false},"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","nullable":true,"maxLength":500},"mode":{"type":"string","enum":["document","software"],"default":"document"},"accessMode":{"type":"string","enum":["open","private"],"default":"open","description":"Open inherits team access. Private adds the creator and admits team owners/admins plus explicitly added members. Existing team roles govern actions. Sharing and publishing remain explicit and independent."}},"required":["name"]}}}},"responses":{"201":{"description":"Created project. Existing clients omitting accessMode create Open projects; creator attribution comes from the authenticated caller.","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"sensitive":{"type":"boolean"},"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"accessMode":{"type":"string","enum":["open","private"]},"createdBy":{"type":"string","nullable":true},"accessRevision":{"type":"integer","minimum":1}},"required":["id","teamId","name","accessMode","accessRevision"]}},"required":["project"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/projects/query":{"post":{"summary":"Find authorized projects by exact case-sensitive AND property filters before pagination. Filters use a request body to avoid property values in URL logs. Read-only; no web filtering UI.","tags":["Projects"],"operationId":"postApiV1TeamsTeamIdProjectsQuery","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"propertyFilters":{"type":"array","maxItems":64,"items":{"type":"object","additionalProperties":false,"properties":{"key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_.-]{0,63}$","description":"Case-sensitive ASCII property key; reserved prototype-related names are refused."},"value":{"type":"string","maxLength":2048,"description":"Untrusted ordinary non-secret metadata; at most 2048 UTF-8 bytes. Empty strings and Unicode are preserved."}},"required":["key","value"]},"description":"Exact case-sensitive equality; all filters must match. Authorization and filters precede pagination."},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0},"sort":{"type":"string","enum":["name","createdAt","updatedAt"]},"order":{"type":"string","enum":["asc","desc"]},"status":{"type":"string","enum":["active","archived","all"]}}}}}},"responses":{"200":{"description":"Authorized project page. Property values are not included; exact filters and access checks precede pagination.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sensitive":{"type":"boolean"},"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"mode":{"type":"string","enum":["document","software"]},"status":{"type":"string","enum":["active","archived"]},"accessMode":{"type":"string","enum":["open","private"]},"accessRevision":{"type":"integer","minimum":1},"createdBy":{"type":"string","nullable":true},"slug":{"type":"string","nullable":true},"settings":{"type":"object"},"timezone":{"type":"string"},"locale":{"type":"string"},"substitutionEnabled":{"type":"boolean"},"templateId":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"publicSite":{"type":"object","nullable":true,"properties":{"url":{"type":"string"},"hostnameUrl":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true}}}},"required":["sensitive","id","teamId","name","description","mode","status","accessMode","accessRevision","createdBy","slug","settings","timezone","locale","substitutionEnabled","templateId","createdAt","updatedAt","publicSite"]}},"limit":{"type":"integer","minimum":1,"maximum":200},"offset":{"type":"integer","minimum":0},"hasMore":{"type":"boolean"}},"required":["items","limit","offset","hasMore"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos":{"get":{"summary":"Connected git repositories.","tags":["Repositories"],"operationId":"getApiV1TeamsTeamIdRepos","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Connect a repository. Credentials are stored as ciphertext and never echoed. `pollIntervalMinutes` sets the scheduled check: `null` off, `0` the plan default (the plan’s fastest interval), or 15, 30, 60, 360 or 1440; a value below the plan floor is refused with 429 LIMIT_EXCEEDED on `repoRefreshInterval`. Self-hosted GitHub is refused (400); connect github.com, or a Gitea-compatible host as `gitea`. Rate-limited per team: 10 attempts per 10 minutes, refused ones included, then 429 LIMIT_EXCEEDED with `retryAfterSeconds`.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdRepos","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}":{"delete":{"summary":"Disconnect a repository.","tags":["Repositories"],"operationId":"deleteApiV1TeamsTeamIdReposRepoId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One connected repository, its last sync and its schedule: `polling` carries `intervalMinutes` (as stored), `effectiveIntervalMinutes` (clamped to the plan floor; hourly at least for a token-less github.com repository), `nextDueAt`, `lastCheckedAt`, `pausedAt`, `pausedReason` and `consecutiveFailures`. When the last sync failed for a reason the team can fix, `lastErrorCode` names it (`ROOT_NOT_FOUND`, `ROOT_EMPTY`, `BRANCH_NOT_FOUND`, `LISTING_INCOMPLETE`, `LISTING_TOO_LARGE`, `ROOT_TOO_LARGE`, `NO_SYNCABLE_PATHS`, `SETTINGS_CHANGED`) with `lastErrorParams`; otherwise both are null and `lastError` is the only detail. `lastSync` is the newest run that was not skipped (null when there is none): its `trigger`, `status`, `createdAt` and, while it runs, `progress` (`{ done, total }`: files handled so far, and those plus the files still to fetch; null otherwise).","tags":["Repositories"],"operationId":"getApiV1TeamsTeamIdReposRepoId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a connection (branch, root path, credentials, `pollIntervalMinutes` as on connect). A new token or branch on a paused repository resumes its scheduled checks. Only files under the root path are synced: at the next sync, documents outside a new root are archived (kept and hidden, and their share links stop working) and come back if the root is widened. The audit row records the old and new root, branch and target.","tags":["Repositories"],"operationId":"patchApiV1TeamsTeamIdReposRepoId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/documents":{"get":{"summary":"Documents synced from a repository, with their upstream paths.","tags":["Repositories"],"operationId":"getApiV1TeamsTeamIdReposRepoIdDocuments","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/render":{"post":{"summary":"Render a synced repository document.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdReposRepoIdRender","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}},{"name":"paperSize","in":"query","schema":{"type":"string","enum":["A3","A4","A5","Letter","Legal"]},"description":"Transient paper size after saved settings and front matter; invalid or duplicate values are rejected. Omit to use document defaults."},{"name":"paperOrientation","in":"query","schema":{"type":"string","enum":["portrait","landscape"]},"description":"Transient paper orientation; does not alter content, style or saved settings."}],"x-required-scope":"documents:read","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/rotate-webhook-secret":{"post":{"summary":"Issue a new webhook signing secret; the old one stops verifying immediately.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdReposRepoIdRotateWebhookSecret","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/search":{"get":{"summary":"The same search as `GET /teams/{teamId}/search`, scoped to one connected repository.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdReposRepoIdSearch","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Results, and the index status block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/teams/{teamId}/repos/{repoId}/search/suggest":{"get":{"summary":"The same type-ahead as `GET /teams/{teamId}/search/suggest`, scoped to one connected repository.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdReposRepoIdSearchSuggest","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Type-ahead suggestions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuggestions"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/teams/{teamId}/repos/{repoId}/shares":{"post":{"summary":"Create a share link for a synced repository document. An archived document is refused like a missing path (404), and an existing link to a document stops serving while it is archived. The response carries `sensitiveContent` (`{ kind, label }`) when the document holds potentially sensitive content; pass `acknowledgeSensitive: true` to record that the person creating the link was warned. The warning never blocks the share. While the owning team blocks sensitive sharing (`PATCH /teams/{teamId}/settings`), a potentially sensitive document is refused with 403 UNAUTHORIZED, `details.reason: team-policy`. When the policy cannot be read, nothing is created and the call answers 503 CONFIG, `details.reason: team-policy-unavailable`; try again.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdReposRepoIdShares","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/sync":{"post":{"summary":"Run a sync now. Answers 200 with the report, 202 `queued` (inside the plan’s refresh floor, or while a large import is in flight, which only the minute tick continues; `dueAt` says when it runs), 202 `continuing` (a large repository finishes in the background, one chunk per minute tick), 202 `skipped` with `reason` `rate_limit`, `id` and `dueAt` when the git host’s request limit stopped it (a wait, not a failure; `dueAt` is the next check, null when nothing is scheduled) or 409 while a sync is already running. A paused repository is resumed first (`REPO_SYNC_RESUMED`) and the plan floor does not apply to that request; a self-hosted GitHub repository answers 400. Rate-limited per repository (6 requests per 10 minutes) and per team (30 per 10 minutes), then 429 LIMIT_EXCEEDED with `retryAfterSeconds`. One sync per repository at a time, shared with the push webhook and the scheduled check; only changed files are fetched. The report counts `imported`, `updated`, `archived` (left the branch or the root path) and `restored` (archived documents back in scope); a file that does not fit the plan’s file limit is `skipped`, and an archived one stays archived. A failure the team can fix carries `errorCode` and `errorParams`, as on the repository.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdReposRepoIdSync","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/syncs":{"get":{"summary":"Sync runs for one repository, newest first: manual, webhook and scheduled checks (`trigger`), with `status` ok, error, running or skipped, and for a skipped run its `reason` (`floor`, `ping`, `other_ref`, `other_event`, `rate_limit`); a `floor` run carries `dueAt`, when the queued sync runs, and a `rate_limit` run (the git host’s request limit; consecutive ones update one row) carries `dueAt`, the next check, and `count`, how many in a row (`dueAt` null on every other run and when nothing is scheduled, `count` 0 on every other run). Each run carries `headSha` and `finishedAt`. A failed run whose refusal the team can fix carries `errorCode` (`ROOT_NOT_FOUND`, `ROOT_EMPTY`, `BRANCH_NOT_FOUND`, `LISTING_INCOMPLETE`, `LISTING_TOO_LARGE`, `ROOT_TOO_LARGE`, `NO_SYNCABLE_PATHS`, `SETTINGS_CHANGED`) and `errorParams` beside the English `error`; both are null on every other run. A `running` run carries `progress`, `{ done, total }`: files handled so far, and those plus the files still to fetch (null on every other run). Each of its `actions` is `{ path, action, reason? }`, `action` one of `created`, `updated`, `archived`, `restored` or `skipped`; a skipped file carries `reason` (`unsafe_path`, `duplicate_path`, `too_large`, `file_limit`), and so does a document archived because its path is now refused. `limit` 1 to 100, default 50.","tags":["Repositories"],"operationId":"getApiV1TeamsTeamIdReposRepoIdSyncs","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/{repoId}/test":{"post":{"summary":"Check that the stored credentials still reach the repository.","tags":["Repositories"],"operationId":"postApiV1TeamsTeamIdReposRepoIdTest","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"repoId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/repos/syncs":{"get":{"summary":"Recent sync runs across the team’s repositories, each with its counts (including `restored`) and per-file actions.","tags":["Repositories"],"operationId":"getApiV1TeamsTeamIdReposSyncs","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/search":{"get":{"summary":"Full-text and semantic search across every project, endpoint and repository document the team has indexed. `q` (2–256 chars), `mode` (`auto` default, or `keyword`/`semantic`), `limit` (default 20, max 50) and `kinds` are all validated at the edge. Refused with 404 FEATURE_UNAVAILABLE, 403 PLAN_RESTRICTION or 409 SEARCH_DISABLED when the team cannot search right now; each result carries only what its sensitivity policy allows. Rate-limited per authenticated user across every channel (REST, MCP, the app, the CLI): a burst of 60 a minute shared by every channel, a sustained allowance of 600 an hour (a token bucket of 120, refilled 10 a minute) kept separately for the interactive app and for automation (API keys, OAuth clients, MCP), and 600 a minute per team. Each bucket is consumed atomically in order (user minute, user sustained, team), so the caps are hard under concurrency; a request a later bucket refuses is refunded to the earlier ones, best-effort, so a refused request counts for nothing beyond the brief window before the refund. A refusal is 429 LIMIT_EXCEEDED with `details.reason: RATE_LIMITED` and a `Retry-After` header; a counter that cannot be trusted answers 503 SEARCH_UNAVAILABLE with `Retry-After` instead of admitting.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdSearch","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Results, and the index status block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/teams/{teamId}/search-settings":{"get":{"summary":"Search state for the team, readable by every member: whether search is on, when it is due to be deleted or may be turned back on, and caller-scoped index status. Aggregate sensitivity diagnostics are available to owners and admins. Carries no document content.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdSearchSettings","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Search state for the team.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSettings"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Turn search on or off for the team (owners and admins). `{ \"enabled\": boolean }`. Turning it off starts a grace period before the index is deleted. Turning it back on may be refused: 409 SEARCH_REENABLE_LOCKED while the 24-hour lock from a prior delete-now is in effect, 409 SEARCH_REBUILD_LIMIT with no rebuilds left this month, or 409 SEARCH_DELETE_IN_PROGRESS while the vendor delete is in flight. `details.retryAfter` is always an ISO-8601 instant, never a duration.","tags":["Search"],"operationId":"putApiV1TeamsTeamIdSearchSettings","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"Search state for the team, after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSettings"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"SEARCH_REENABLE_LOCKED: search cannot be turned back on yet (a prior delete-now’s 24-hour lock is in effect). SEARCH_REBUILD_LIMIT: no index rebuilds are left this month. SEARCH_DELETE_IN_PROGRESS: the vendor delete is in flight."}}}},"/api/v1/teams/{teamId}/search-settings/delete-index":{"post":{"summary":"Delete the team’s search index now (owner only). Turns search off, starts a 24-hour re-enable lock, and enqueues the vendor-side delete. Answers the same shape as the PUT above; calling it on a team with nothing indexed and nothing scheduled changes nothing and costs no rebuild.","tags":["Search"],"operationId":"postApiV1TeamsTeamIdSearchSettingsDeleteIndex","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"Search state for the team, after the delete was scheduled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSettings"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"SEARCH_REENABLE_LOCKED: search cannot be turned back on yet (a prior delete-now’s 24-hour lock is in effect). SEARCH_REBUILD_LIMIT: no index rebuilds are left this month. SEARCH_DELETE_IN_PROGRESS: the vendor delete is in flight."}}}},"/api/v1/teams/{teamId}/search/suggest":{"get":{"summary":"Type-ahead over titles and paths only (no passages), served from D1 so it keeps working while the vendor index is down or unconfigured. `q` is 1–128 chars; `limit` caps at 8. Its own budget, separate from full search: 240 a minute per authenticated user and 2000 a minute per team, refused with 429 and `Retry-After`.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdSearchSuggest","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"200":{"description":"Type-ahead suggestions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuggestions"}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project Also: PLAN_RESTRICTION: search is not included in this plan."},"404":{"description":"Not found Also: FEATURE_UNAVAILABLE: search is not available (platform mode is off, or this team is not allowlisted)."},"409":{"description":"SEARCH_DISABLED: the team has turned search off."},"429":{"description":"RATE_LIMITED: this user (across REST, MCP, the app and the CLI) or this team has spent its search budget. `details.retryAfterSeconds` and the Retry-After header name the longest wait among the budgets that refused. A refused request is refunded to any budget it had already been charged to (best-effort), so retrying early gains nothing and costs nothing beyond the request itself."},"503":{"description":"SEARCH_UNAVAILABLE: the vendor or embedder could not be reached. Try again."}}}},"/api/v1/teams/{teamId}/search/warm":{"get":{"summary":"Hint that a search is about to happen (opening the command palette). Vendor errors and search-state refusals are swallowed (204 either way); the one answer it does refuse is its own rate limit: 429 with `Retry-After`, once per 5 minutes per team.","tags":["Search"],"operationId":"getApiV1TeamsTeamIdSearchWarm","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:read","responses":{"204":{"description":"The hint was received. No body."},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/settings":{"get":{"summary":"Team settings every member can read: whether sharing of potentially sensitive security documents outside the team is blocked.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdSettings","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Current settings.","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"blockSensitiveSharing":{"type":"boolean"},"blockSensitiveProjects":{"type":"boolean","default":true},"sharingPolicyUpdatedAt":{"type":"string","nullable":true}},"required":["blockSensitiveSharing","blockSensitiveProjects","sharingPolicyUpdatedAt"]}},"required":["settings"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Change team settings (owners and admins). `blockSensitiveSharing: true` refuses new share links to potentially sensitive security documents and pauses existing ones until it is turned off; each change is audited once (a request that changes nothing writes nothing). `blockSensitiveProjects` independently blocks all public shares and public sites of projects marked sensitive (default true). Omitted settings preserve their current value. Unknown fields or non-boolean values are refused with 400 INVALID_REQUEST.","tags":["Teams"],"operationId":"patchApiV1TeamsTeamIdSettings","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"blockSensitiveSharing":{"type":"boolean"},"blockSensitiveProjects":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Current settings.","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"blockSensitiveSharing":{"type":"boolean"},"blockSensitiveProjects":{"type":"boolean","default":true},"sharingPolicyUpdatedAt":{"type":"string","nullable":true}},"required":["blockSensitiveSharing","blockSensitiveProjects","sharingPolicyUpdatedAt"]}},"required":["settings"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/usage":{"get":{"summary":"The plan’s capabilities, and its limit and current consumption for every key it carries: projects, documents, members, collaborators, endpoints, templates and connected repositories team-wide, plus sharesPerArtifact, filesPerRepo, versionsKept and repoRefreshInterval. Those last four are enforced per document or per repository, so each reports the team’s busiest one (the one closest to being refused) rather than a team-wide total.","tags":["Teams"],"operationId":"getApiV1TeamsTeamIdUsage","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/vulnerability-scan":{"get":{"summary":"Read default-on team vulnerability-scan preferences, explicit adoption status and current OSV disclosure facts. Missing adoption never means consent; this metadata route reads no SBOM content.","tags":["Security"],"operationId":"getApiV1TeamsTeamIdVulnerabilityScan","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"Current private settings metadata or guarded mutation receipt; no provider call or content eligibility claim.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string"},"settings":{"type":"object","additionalProperties":false,"properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"preferenceEnabled":{"type":"boolean"},"policyGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"adoption":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["missing","accepted","outdated","revoked"]},"requiredDisclosureVersion":{"type":"string","enum":["sbom-scan-osv-v2"]},"scope":{"type":"string","enum":["eligible-existing-and-future",null],"nullable":true},"acceptedAt":{"type":"string","format":"date-time","nullable":true}},"required":["status","requiredDisclosureVersion","scope","acceptedAt"]}},"required":["revision","preferenceEnabled","policyGeneration","adoption"]},"disclosure":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string","enum":["sbom-scan-osv-v2"]},"provider":{"type":"string","enum":["osv"]},"operator":{"type":"string","enum":["Google"]},"scope":{"type":"string","enum":["eligible-existing-and-future"]},"sentFields":{"type":"array","items":{"type":"string","enum":["ecosystem","package-name","version"]}},"triggers":{"type":"array","items":{"type":"string","enum":["initial-upload","substantive-edit","periodic-refresh"]}},"packageListCanRevealSoftware":{"type":"boolean","enum":[true]},"sentRequestsCannotBeRecalled":{"type":"boolean","enum":[true]},"excluded":{"type":"array","items":{"type":"string","enum":["identities-marked-private","unsupported-ecosystems"]}},"privateIdentityDetection":{"type":"string","enum":["explicit-purl-location-markers"]},"unmarkedPrivateIdentitiesMayBeSent":{"type":"boolean","enum":[true]},"publication":{"type":"string","enum":["scanner-attributed-document-version"]},"preservesAuthorEntriesAndVex":{"type":"boolean","enum":[true]},"disappearedFindingsMeaning":{"type":"string","enum":["no-longer-detected"]},"findingsVisibleToDocumentReaders":{"type":"boolean","enum":[true]}},"required":["version","provider","operator","scope","sentFields","triggers","packageListCanRevealSoftware","sentRequestsCannotBeRecalled","excluded","privateIdentityDetection","unmarkedPrivateIdentitiesMayBeSent","publication","preservesAuthorEntriesAndVex","disappearedFindingsMeaning","findingsVisibleToDocumentReaders"]},"planAvailability":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["available","unavailable","unknown"]},"documentLimit":{"type":"integer","minimum":0,"maximum":9007199254740991,"nullable":true}},"required":["status","documentLimit"]}},"required":["teamId","settings","disclosure","planAvailability"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"put":{"summary":"Current owner/admin with management authority may explicitly accept the current disclosure and eligible-existing-and-future scope, revoke adoption or set team preference. Revision-guarded and audited; preference edits never accept provider processing. Operational rollout remains independent.","tags":["Security"],"operationId":"putApiV1TeamsTeamIdVulnerabilityScan","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["accept","enable"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"disclosureVersion":{"type":"string","enum":["sbom-scan-osv-v2"]},"scope":{"type":"string","enum":["eligible-existing-and-future"]}},"required":["action","expectedRevision","disclosureVersion","scope"]},{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["revoke"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["action","expectedRevision"]},{"type":"object","additionalProperties":false,"properties":{"action":{"type":"string","enum":["set-preference"]},"expectedRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"enabled":{"type":"boolean"}},"required":["action","expectedRevision","enabled"]}]}}}},"responses":{"200":{"description":"Current private settings metadata or guarded mutation receipt; no provider call or content eligibility claim.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"teamId":{"type":"string"},"changed":{"type":"boolean"},"settings":{"type":"object","additionalProperties":false,"properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"preferenceEnabled":{"type":"boolean"},"policyGeneration":{"type":"integer","minimum":0,"maximum":9007199254740991},"adoption":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["missing","accepted","outdated","revoked"]},"requiredDisclosureVersion":{"type":"string","enum":["sbom-scan-osv-v2"]},"scope":{"type":"string","enum":["eligible-existing-and-future",null],"nullable":true},"acceptedAt":{"type":"string","format":"date-time","nullable":true}},"required":["status","requiredDisclosureVersion","scope","acceptedAt"]}},"required":["revision","preferenceEnabled","policyGeneration","adoption"]}},"required":["teamId","changed","settings"]}}}},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"},"409":{"description":"Expected document or policy revision changed. Reload settings before reconciling."},"429":{"description":"Settings generation capacity or normal service-write limit reached."}}}},"/api/v1/teams/{teamId}/webhooks":{"get":{"summary":"The team’s webhook destinations. Pass ?url= to ask whether one callback address is already registered.","tags":["Webhooks"],"operationId":"getApiV1TeamsTeamIdWebhooks","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Register a destination. Returns the signing secret ONCE. It is never readable afterwards, only rotatable. A URL in private address space is refused here rather than at delivery.","tags":["Webhooks"],"operationId":"postApiV1TeamsTeamIdWebhooks","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/webhooks/{webhookId}":{"delete":{"summary":"Remove a destination and everything queued for it.","tags":["Webhooks"],"operationId":"deleteApiV1TeamsTeamIdWebhooksWebhookId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One destination, its subscriptions and its recent health.","tags":["Webhooks"],"operationId":"getApiV1TeamsTeamIdWebhooksWebhookId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Change a destination’s URL, subscriptions, description, or switch it off and on.","tags":["Webhooks"],"operationId":"patchApiV1TeamsTeamIdWebhooksWebhookId}","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/webhooks/{webhookId}/deliveries":{"get":{"summary":"What happened to this destination’s events: attempts, status codes and reasons.","tags":["Webhooks"],"operationId":"getApiV1TeamsTeamIdWebhooksWebhookIdDeliveries","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/teams/{teamId}/webhooks/{webhookId}/rotate-secret":{"post":{"summary":"Issue a new signing secret, returned once. The previous one keeps verifying for 24 hours so a receiver can be updated without a synchronised cutover.","tags":["Webhooks"],"operationId":"postApiV1TeamsTeamIdWebhooksWebhookIdRotateSecret","parameters":[{"name":"teamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"access-keys:manage","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/templates":{"get":{"summary":"Team page-layout templates (headers, footers, watermarks).","tags":["Templates"],"operationId":"getApiV1Templates","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"post":{"summary":"Create a page-layout template. Asking for the advanced kind, or for content only it carries (footers, watermarks), requires the advanced-formatting capability: without it the call is refused (403 PLAN_RESTRICTION) rather than saved as a basic template with the premium parts dropped.","tags":["Templates"],"operationId":"postApiV1Templates","parameters":[],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"201":{"description":"Created"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/templates/{templateId}":{"delete":{"summary":"Delete a page-layout template.","tags":["Templates"],"operationId":"deleteApiV1TemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"get":{"summary":"One page-layout template.","tags":["Templates"],"operationId":"getApiV1TemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a page-layout template. Turning the advanced kind or its premium content ON requires the advanced-formatting capability (403 PLAN_RESTRICTION); editing a template that already has them (renaming it, for example) does not, so a downgraded team is not locked out of what it owns.","tags":["Templates"],"operationId":"patchApiV1TemplatesTemplateId}","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"x-required-scope":"documents:write","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}},"/api/v1/webhooks/events":{"get":{"summary":"Every lifecycle event a webhook may subscribe to, including document.scanned for MDL scanner outcomes. Scan events identify the run and original/result versions, preserve explicit coverage, and use null counts for failed runs. Listing or subscribing does not activate scanning.","tags":["Webhooks"],"operationId":"getApiV1WebhooksEvents","parameters":[],"x-required-scope":"projects:read","responses":{"200":{"description":"OK"},"400":{"description":"Invalid request"},"401":{"description":"Unauthenticated: no valid OAuth access token"},"403":{"description":"Forbidden: insufficient role, missing scope, a plan that does not include the capability, or a credential bound to a different team or project"},"404":{"description":"Not found"}}}}}}