{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Macrofold API","version":"0.9.0","description":"Manage persistent projects, run cloud agents, stream progress, and integrate tools, billing, and operator reporting. Provider-owned OAuth, internal runtime ingress, and MCP JSON-RPC use separate contracts.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"}},"servers":[{"url":"https://macrofold-staging.vercel.app"}],"paths":{"/v1/projects":{"get":{"operationId":"listProjects","summary":"List authorized projects","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"in":"query","name":"query","schema":{"type":"string","maxLength":120},"description":"Case-insensitive literal substring of the project name."},{"in":"query","name":"archived","schema":{"type":"boolean"},"description":"Filter archived or active projects."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:read"]},"post":{"operationId":"createProject","summary":"Create a project","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"x-required-scopes":["projects:write"]}},"/v1/projects/{project_id}":{"get":{"operationId":"getProject","summary":"Inspect a project","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:read"]},"patch":{"operationId":"updateProject","summary":"Update project settings","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectPatch"}}}},"x-required-scopes":["projects:write"]},"delete":{"operationId":"deleteProject","summary":"Archive a project","tags":["projects"],"description":"Archive a project once its runs finish. Files and history remain available. Use the project deletion endpoint to schedule permanent removal.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:write"]}},"/v1/projects/{project_id}/workspaces":{"get":{"operationId":"listWorkspaces","summary":"List project workspaces","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:read"]},"post":{"operationId":"createWorkspace","summary":"Create an isolated workspace","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreate"}}}},"x-required-scopes":["projects:write"]}},"/v1/workspaces/{workspace_id}":{"get":{"operationId":"getWorkspace","summary":"Inspect a workspace","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:read"]},"delete":{"operationId":"deleteWorkspace","summary":"Schedule workspace deletion","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:write"]},"patch":{"operationId":"updateWorkspace","summary":"Rename a remote workspace","description":"","tags":["workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePatch"}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"x-required-scopes":["projects:write"]}},"/v1/workspaces/{workspace_id}/files":{"get":{"operationId":"listFiles","summary":"Browse a revision of the workspace","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","schema":{"type":"string","default":""}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"in":"query","name":"query","schema":{"type":"string","maxLength":4096},"description":"Case-insensitive literal substring of the relative file path."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListing"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:read"]}},"/v1/workspaces/{workspace_id}/file":{"get":{"operationId":"readFile","summary":"Read file bytes","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FilePath"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean"},"description":"Redirect to a short-lived streaming download, including files larger than 4 MiB."}],"responses":{"200":{"description":"Raw file bytes; active content served as attachment","headers":{"ETag":{"schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"302":{"description":"Temporary private download URL","headers":{"Location":{"schema":{"type":"string","format":"uri"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:read"]},"put":{"operationId":"writeFile","summary":"Persist an atomic file replacement","tags":["workspaces"],"description":"Binary-safe direct file writes up to 4 MiB; use staged transfers for files up to 25 MiB. Requires If-Match and Idempotency-Key; no active writer.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FilePath"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"Maximum 4 MiB. Use a staged transfer for files up to 25 MiB."}}}},"x-required-scopes":["files:write"]},"delete":{"operationId":"deleteFile","summary":"Persist file deletion","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/FilePath"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:write"]}},"/v1/workspaces/{workspace_id}/checkpoints":{"get":{"operationId":"listCheckpoints","summary":"List recoverable checkpoints","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Checkpoint"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:read"]},"post":{"operationId":"createCheckpoint","summary":"Create a verified checkpoint","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointCreate"}}}},"x-required-scopes":["files:write"]}},"/v1/workspaces/{workspace_id}/restore":{"post":{"operationId":"restoreWorkspace","summary":"Restore without rewriting remote history","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreRequest"}}}},"x-required-scopes":["files:write"]}},"/v1/workspaces/{workspace_id}/sync":{"get":{"operationId":"getSync","summary":"Inspect Git integration","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitSync"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:read"]},"post":{"operationId":"syncWorkspace","summary":"Retry Git integration without rerunning the agent","tags":["workspaces"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["push","pull","pull_request"],"default":"push"}},"additionalProperties":false}}}},"x-required-scopes":["files:write"]}},"/v1/agents":{"get":{"operationId":"listAgents","summary":"List reusable agent definitions","tags":["agents"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]},"post":{"operationId":"createAgent","summary":"Create an agent definition","tags":["agents"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreate"}}}},"x-required-scopes":["runs:write"]}},"/v1/agents/{agent_id}":{"get":{"operationId":"getAgent","summary":"Inspect an agent definition","tags":["agents"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]},"patch":{"operationId":"updateAgent","summary":"Create the next definition revision","tags":["agents"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPatch"}}}},"x-required-scopes":["runs:write"]},"delete":{"operationId":"deleteAgent","summary":"Archive an agent definition","tags":["agents"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"204":{"description":"Completed"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:write"]}},"/v1/sessions":{"get":{"operationId":"listSessions","summary":"List continuing sessions","tags":["sessions"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Session"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]},"post":{"operationId":"createSession","summary":"Create a session","tags":["sessions"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreate"}}}},"x-required-scopes":["runs:write"]}},"/v1/sessions/{session_id}":{"get":{"operationId":"getSession","summary":"Inspect a session","tags":["sessions"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/sessions/{session_id}/messages":{"post":{"operationId":"continueSession","summary":"Start a follow-up run","tags":["sessions"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAccepted"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"x-required-scopes":["runs:write"]}},"/v1/runs":{"get":{"operationId":"listRuns","summary":"List current and historical runs","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"project_id","in":"query","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Run"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]},"post":{"operationId":"createRun","summary":"Invoke an agent harness","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAccepted"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCreate"}}}},"x-required-scopes":["runs:write"]}},"/v1/runs/{run_id}":{"get":{"operationId":"getRun","summary":"Inspect run state","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/runs/{run_id}/cancel":{"post":{"operationId":"cancelRun","summary":"Request idempotent cancellation","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"x-required-scopes":["runs:write"]}},"/v1/runs/{run_id}/input":{"post":{"operationId":"submitRunInput","summary":"Answer a pending input request","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunInput"}}}},"x-required-scopes":["runs:write"]}},"/v1/runs/{run_id}/result":{"get":{"operationId":"getRunResult","summary":"Retrieve partial or final results","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResult"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/runs/{run_id}/events":{"get":{"operationId":"listRunEvents","summary":"Retrieve durable event history","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/runs/{run_id}/stream":{"get":{"operationId":"streamRun","summary":"Stream resumable durable events","tags":["runs"],"description":"Durable SSE; sequence cursor via Last-Event-ID or after. Rotate after 55 seconds; reconnect and refresh auth without rerunning. Cursor expiry explicitly reports retained bounds. Stream disconnect never cancels.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Last-Event-ID","in":"header","schema":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."}},{"name":"after","in":"query","schema":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"SSE event IDs are persisted run sequences; heartbeat comments are not product events.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/runs/{run_id}/artifacts":{"get":{"operationId":"listArtifacts","summary":"List run artifacts","tags":["runs"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/artifacts/{artifact_id}/download":{"get":{"operationId":"downloadArtifact","summary":"Get an authorized short-lived download URL","tags":["artifacts"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Download"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/connections":{"get":{"operationId":"listConnections","summary":"List configured connections","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:read"]},"post":{"operationId":"createConnection","summary":"Create credential or MCP connection","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionCreate"}}}},"x-required-scopes":["connections:write"]}},"/v1/connections/{connection_id}":{"get":{"operationId":"getConnection","summary":"Inspect connection without secrets","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:read"]},"patch":{"operationId":"updateConnection","summary":"Update connection configuration","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionPatch"}}}},"x-required-scopes":["connections:write"]},"delete":{"operationId":"deleteConnection","summary":"Revoke connection access","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"204":{"description":"Completed"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:write"]}},"/v1/connections/{connection_id}/authorize":{"post":{"operationId":"authorizeConnection","summary":"Begin authorization","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationLink"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeRequest"}}}},"x-required-scopes":["connections:write"]}},"/v1/connections/{connection_id}/test":{"post":{"operationId":"testConnection","summary":"Perform non-side-effecting discovery check","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionTest"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"x-required-scopes":["connections:write"]}},"/v1/connections/{connection_id}/tools":{"get":{"operationId":"listConnectionTools","summary":"Inspect discovered and granted tools","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:read"]}},"/v1/api-keys":{"get":{"operationId":"listApiKeys","summary":"List key metadata","tags":["api-keys"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["keys:write"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["keys:write"]},"post":{"operationId":"createApiKey","summary":"Create a scoped key; reveal once","tags":["api-keys"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["keys:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApiKey"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreate"}}}},"x-required-scopes":["keys:write"]}},"/v1/api-keys/{key_id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke a key","tags":["api-keys"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["keys:write"]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"204":{"description":"Completed"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["keys:write"]}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook destinations","tags":["webhook-endpoints"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["webhooks:read"]},"post":{"operationId":"createWebhookEndpoint","summary":"Register and validate a destination","tags":["webhook-endpoints"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhook"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"x-required-scopes":["webhooks:write"]}},"/v1/webhook-endpoints/{endpoint_id}":{"patch":{"operationId":"updateWebhookEndpoint","summary":"Update destination configuration","tags":["webhook-endpoints"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:write"]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"x-required-scopes":["webhooks:write"]},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Disable a webhook destination","tags":["webhook-endpoints"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:write"]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"204":{"description":"Completed"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["webhooks:write"]}},"/v1/webhook-deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"Inspect durable deliveries","tags":["webhook-deliveries"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["webhooks:read"]}},"/v1/webhook-deliveries/{delivery_id}/replay":{"post":{"operationId":"replayWebhookDelivery","summary":"Replay delivery without rerunning work","tags":["webhook-deliveries"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:write"]}],"parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Accepted asynchronous operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"x-required-scopes":["webhooks:write"]}},"/v1/usage":{"get":{"operationId":"getUsage","summary":"Get tenant-scoped usage","tags":["usage"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["usage:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/GroupBy"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["usage:read"]}},"/v1/requests":{"get":{"operationId":"listRequests","summary":"Inspect tenant request history","tags":["requests"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["usage:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestRecord"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["usage:read"]}},"/v1/billing":{"get":{"operationId":"getBilling","summary":"Inspect balance, limits and rates","tags":["billing"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["usage:read"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["usage:read"]}},"/v1/billing/checkout":{"post":{"operationId":"createCheckout","summary":"Create a server-priced checkout","tags":["billing"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["billing:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreate"}}}},"x-required-scopes":["billing:write"]}},"/v1/billing/portal":{"post":{"operationId":"createBillingPortal","summary":"Open organization billing portal","tags":["billing"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["billing:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}},"x-required-scopes":["billing:write"]}},"/v1/harnesses":{"get":{"operationId":"listHarnesses","summary":"Discover supported harnesses","tags":["harnesses"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Harness"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/models":{"get":{"operationId":"listModels","summary":"Discover tested model combinations","tags":["models"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"parameters":[{"name":"harness","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["runs:read"]}},"/v1/operations/{operation_id}":{"get":{"operationId":"getOperation","summary":"Inspect asynchronous action","tags":["operations"],"description":"Inspect durable operation. For kind=checkpoint_export, successful result matches CheckpointExport. Creation of a workspace resolves result.workspace_id and source_commit before CLI selects it. Authorization derives from the stored operation kind and target; require corresponding project/file/run read permission, never merely possession of operation ID.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":[]}],"parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":[],"x-conditional-scopes":{"workspace_lifecycle":["projects:read"],"file_transfer_or_checkpoint_or_export_or_git_sync":["files:read"],"run_lifecycle":["runs:read"]}}},"/admin/v1/metrics/growth":{"get":{"operationId":"getGrowthMetrics","summary":"Growth, activation, retention and human activity","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["metrics:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/GroupBy"},{"name":"organization_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/metrics/usage":{"get":{"operationId":"getPlatformUsageMetrics","summary":"Requests, tokens and cost across tenants","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["metrics:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"$ref":"#/components/parameters/GroupBy"},{"name":"organization_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/accounts":{"get":{"operationId":"listAccounts","summary":"Search platform account summaries","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["accounts:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"name":"query","in":"query","schema":{"type":"string","description":"ID/name search; email matching requires accounts:pii:read."}},{"name":"include_contact","in":"query","schema":{"type":"boolean","default":false},"description":"Requires accounts:pii:read; otherwise forbidden."},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/accounts/{account_id}":{"get":{"operationId":"getAccountSummary","summary":"Inspect account without customer content","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["accounts:read"]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"name":"include_contact","in":"query","schema":{"type":"boolean","default":false},"description":"Requires accounts:pii:read; otherwise forbidden."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSummary"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/requests":{"get":{"operationId":"listPlatformRequests","summary":"Query attributed HTTP attempts","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["metrics:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"name":"organization_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"status_code","in":"query","schema":{"type":"integer"}},{"name":"route","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RequestRecord"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/runs/{run_id}/diagnostics":{"get":{"operationId":"getRunDiagnostics","summary":"Read sanitized execution diagnostics","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["operations:read"]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Diagnostics"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/infrastructure/health":{"get":{"operationId":"getInfrastructureHealth","summary":"Read fresh or explicitly stale provider health","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["operations:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"name":"service_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/infrastructure/capacity":{"get":{"operationId":"getCapacityReport","summary":"Read capacity evidence and recommendations","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["operations:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/admin/v1/reports/operating":{"get":{"operationId":"getOperatingReport","summary":"Read deterministic business and infrastructure report","tags":["Operator"],"description":"Read-only operator projection. Customer API keys rejected. Scope/audience checked and access audited. Raw intervals max 90 days; aggregate intervals max 24 months.","security":[{"OperatorOAuth":["metrics:read","operations:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{connection_id}/grants":{"get":{"tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Current authorized grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionGrantSet"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getConnectionGrants","summary":"Inspect connection tool grants","x-required-scopes":["connections:read"]},"put":{"tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Current authorized grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionGrantSet"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"setConnectionGrants","summary":"Replace explicitly authorized tool grants","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionGrantSet"}}}},"x-required-scopes":["connections:write"]}},"/v1/checkpoints/{checkpoint_id}":{"patch":{"operationId":"updateCheckpointRetention","summary":"Pin or unpin a retained checkpoint","tags":["checkpoints"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"checkpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointPatch"}}}},"responses":{"200":{"description":"Resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkpoint"}}}},"default":{"description":"Resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["files:write"]}},"/v1/webhook-endpoints/{endpoint_id}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","summary":"Rotate signing secret; reveal new value once","tags":["webhook-endpoints"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["webhooks:write"]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWebhook"}}}},"default":{"description":"Resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["webhooks:write"]}},"/v1/me":{"get":{"operationId":"getIdentity","summary":"Inspect identity, memberships, and CLI compatibility","description":"","tags":["me"],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["identity:read"]}],"x-required-scopes":["identity:read"]}},"/v1/workspaces/{workspace_id}/diff":{"get":{"operationId":"getWorkspaceDiff","summary":"Inspect checkpoint-based remote file changes","description":"Default baseline is workspace creation checkpoint. Changes are pinned to response revision; paginated cursors preserve that snapshot. Maximum 1 MiB text diff per page, with truncation explicit. Local comparisons use transfer dry-run.","tags":["workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"base_checkpoint_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDiff"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"]}},"/v1/workspaces/{workspace_id}/transfers":{"post":{"operationId":"createTransfer","summary":"Plan explicit local/remote file transfer","description":"Plan expires after 30 minutes. Short-lived object URLs expire no later than the plan; authenticated GET can refresh URLs while the plan remains valid. Recheck paths, quota, membership and revision before apply. File data bypasses Function bodies.","tags":["workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferCreate"}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"x-conditional-scopes":{"push_or_upload_grant":["files:write"],"pull_or_read":["files:read"]}},"get":{"operationId":"listTransfers","summary":"List file transfer plans","description":"","tags":["workspaces"],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Transfer"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"x-conditional-scopes":{"push_or_upload_grant":["files:write"],"pull_or_read":["files:read"]}}},"/v1/transfers/{transfer_id}":{"get":{"operationId":"getTransfer","summary":"Inspect transfer and refresh permitted object grants","description":"Only creator or authorized organization administrator can resume a plan. Redact upload grants for read-only callers. Never extend plan lifetime on polling.","tags":["transfers"],"parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"x-conditional-scopes":{"push_or_upload_grant":["files:write"],"pull_or_read":["files:read"]}}},"/v1/transfers/{transfer_id}/apply":{"post":{"operationId":"applyTransfer","summary":"Apply staged push or record pull receipt","description":"Returns an idempotent operation. Push requires files:write and an unchanged base revision. Pull acknowledges completed local paths only; client maintains local rollback/resume state. Return 409 for busy/conflicted plans, 412 for stale revision, 410 for expired plan.","tags":["transfers"],"parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransferApply"}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"x-conditional-scopes":{"push_or_upload_grant":["files:write"],"pull_or_read":["files:read"]}}},"/v1/checkpoints/{checkpoint_id}/exports":{"post":{"operationId":"exportCheckpoint","summary":"Export a Git bundle or portable checkpoint archive","description":"Bounded trusted maintenance task with quota checks. Poll getOperation; successful checkpoint_export results match CheckpointExport. No inference runs.","tags":["checkpoints"],"parameters":[{"name":"checkpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportOperation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointExportRequest"}}}},"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"]}},"/v1/integrations/github/installations":{"get":{"operationId":"listGithubInstallations","summary":"listGithubInstallations","tags":["Integrations"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubInstallations"}}}},"default":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:write"]}},"/v1/integrations/github/repositories":{"get":{"operationId":"listGithubRepositories","summary":"listGithubRepositories","tags":["Integrations"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"installation_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GithubRepositories"}}}},"default":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:write"]}},"/v1/projects/{project_id}/github":{"delete":{"operationId":"disconnectGithub","summary":"disconnectGithub","tags":["Integrations"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write"]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:write"]}},"/v1/stdio-packages":{"get":{"operationId":"listStdioPackages","summary":"List reviewed sandbox MCP packages","tags":["connections"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StdioPackagePage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:read"]}},"/v1/organizations":{"post":{"operationId":"createOrganization","summary":"Create an organization","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}}}},"/v1/organization":{"patch":{"operationId":"updateOrganization","summary":"Rename the selected organization","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}}}},"/v1/organization/members":{"get":{"operationId":"listMembers","summary":"List team members","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:read"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:read"]}},"/v1/organization/members/{user_id}":{"patch":{"operationId":"updateMember","summary":"Change a member role","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberPatch"}}}}},"delete":{"operationId":"removeMember","summary":"Remove a team member","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"]}},"/v1/organization/invitations":{"get":{"operationId":"listInvitations","summary":"List pending invitations","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"]},"post":{"operationId":"createInvitation","summary":"Create a single-use email-bound invitation","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreate"}}}}}},"/v1/organization/invitations/{invitation_id}":{"delete":{"operationId":"revokeInvitation","summary":"Revoke a pending invitation","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"]}},"/v1/organization/audit":{"get":{"operationId":"listOrganizationAudit","summary":"Read the latest 100 team administration events","tags":["organizations"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAudit"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"]}},"/v1/storage":{"get":{"operationId":"getStorage","summary":"Inspect retained storage and budget","tags":["billing"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["usage:read"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Storage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["usage:read"]},"patch":{"operationId":"updateStoragePolicy","summary":"Set an explicit storage overage budget","tags":["billing"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Storage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoragePolicy"}}}}}},"/v1/projects/{project_id}/deletion":{"post":{"operationId":"scheduleProjectDeletion","summary":"Schedule permanent deletion with seven days to undo","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:delete"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDeletion"}}}},"x-required-scopes":["projects:delete"]},"delete":{"operationId":"cancelProjectDeletion","summary":"Cancel pending permanent deletion","tags":["projects"],"description":"","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:delete"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:delete"]}},"/admin/v1/reports/snapshots":{"get":{"operationId":"listReportSnapshots","summary":"List stored daily operating reports","tags":["Operator"],"description":"One closed UTC day per snapshot. Read-only, no late-data rewriting. Two-year retention; each request spans at most 366 days. Growth excludes operator-marked internal accounts; usage includes all recorded traffic.","security":[{"OperatorOAuth":["metrics:read","operations:read"]}],"parameters":[{"$ref":"#/components/parameters/From"},{"$ref":"#/components/parameters/To"},{"in":"query","name":"cursor","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSnapshotPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/organization/execution-policy":{"get":{"operationId":"getExecutionPolicy","summary":"Inspect account execution limits","tags":["organizations"],"description":"An unrestricted organization administrator may lower limits within the plan or restore defaults. Running agents are never interrupted. Plans are assigned only by verified billing events. Concurrency is a maximum, not guaranteed immediate capacity.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:read"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionPolicy"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:read"]},"patch":{"operationId":"updateExecutionPolicy","summary":"Set customer concurrency and execution timeout caps","tags":["organizations"],"description":"An unrestricted organization administrator may lower limits within the plan or restore defaults. Running agents are never interrupted. Plans are assigned only by verified billing events. Concurrency is a maximum, not guaranteed immediate capacity.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["organizations:write"]}],"parameters":[{"$ref":"#/components/parameters/Idempotency"},{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionPolicy"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["organizations:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionPolicyPatch"}}}}}},"/v1/connector-catalog":{"get":{"operationId":"listConnectorCatalog","summary":"Browse available app connectors","description":"Complete discovery catalog with app logos, categories and configuration readiness. Uses a cached Composio metadata API response when configured, or the bundled public catalog snapshot. Browsing never authorizes an account or grants tools. No cursor is required: this bounded metadata index is fetched once and searched locally.","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"parameters":[{"name":"X-Organization-Id","in":"header","required":false,"schema":{"type":"string","format":"uuid"},"description":"Authorized membership selector for user tokens/sessions; cannot override API-key organization binding. Required when identity has multiple memberships and no selected grant context."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorCatalog"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["connections:read"]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"}},"required":["error"],"additionalProperties":false},"Operation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"kind":{"type":"string"},"result":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."},"error":{"$ref":"#/components/schemas/ErrorDetail"},"created_at":{"type":"string","format":"date-time"}},"required":["id","status","kind","created_at"],"additionalProperties":false},"ProjectCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"persistence":{"type":"string","enum":["persistent","ephemeral"]},"github":{"type":"object","properties":{"installation_id":{"type":"string"},"repository_id":{"type":"string"},"target_branch":{"type":"string"},"auto_sync":{"type":"boolean","default":false,"description":"Opt in to synchronizing after persisted agent runs."},"sync_mode":{"type":"string","enum":["push","pull_request"],"default":"push"},"auto_pull":{"type":"boolean","default":false,"description":"Fetch and merge incoming target-branch pushes when the workspace is idle. Conflicts preserve local files."}},"required":["installation_id","repository_id","target_branch"],"additionalProperties":false}},"required":["name"],"additionalProperties":false},"ProjectPatch":{"type":"object","properties":{"name":{"type":"string"},"github":{"type":"object","properties":{"installation_id":{"type":"string"},"repository_id":{"type":"string"},"target_branch":{"type":"string"},"auto_sync":{"type":"boolean","default":false,"description":"Opt in to synchronizing after persisted agent runs."},"sync_mode":{"type":"string","enum":["push","pull_request"],"default":"push"},"auto_pull":{"type":"boolean","default":false,"description":"Fetch and merge incoming target-branch pushes when the workspace is idle. Conflicts preserve local files."}},"required":["installation_id","repository_id","target_branch"],"additionalProperties":false},"archived":{"type":"boolean"}},"required":[],"additionalProperties":false},"Project":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"persistence":{"type":"string","enum":["persistent","ephemeral"]},"github":{"type":["object","null"],"properties":{"installation_id":{"type":"string"},"repository_id":{"type":"string"},"target_branch":{"type":"string"},"auto_sync":{"type":"boolean","default":false,"description":"Opt in to synchronizing after persisted agent runs."},"sync_mode":{"type":"string","enum":["push","pull_request"],"default":"push"},"auto_pull":{"type":"boolean","default":false,"description":"Fetch and merge incoming target-branch pushes when the workspace is idle. Conflicts preserve local files."}},"required":["installation_id","repository_id","target_branch"],"additionalProperties":false},"created_at":{"type":"string","format":"date-time"},"storage_bytes":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"archived":{"type":"boolean"},"default_workspace_id":{"type":"string","format":"uuid"},"revision":{"type":"string"},"deletion_due_at":{"type":["string","null"],"format":"date-time"},"deletion_requested_at":{"type":["string","null"],"format":"date-time"}},"required":["id","organization_id","name","persistence","created_at"],"additionalProperties":false},"WorkspaceCreate":{"type":"object","properties":{"name":{"type":"string"},"checkpoint_id":{"type":"string","format":"uuid"},"branch":{"type":"string"},"source":{"$ref":"#/components/schemas/WorkspaceSource"}},"required":["name"],"additionalProperties":false,"not":{"required":["source","checkpoint_id"]},"description":"Independent remote clone and branch. Omit source for project default. Legacy checkpoint_id and source are mutually exclusive. Never uploads a local folder."},"Workspace":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"project_id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"branch":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string","enum":["idle","busy","restoring","degraded","deleting"]},"latest_checkpoint_id":{"type":"string","format":"uuid"},"last_verified_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"source_commit":{"type":"string"},"source_checkpoint_id":{"type":"string","format":"uuid"},"git_commit":{"type":"string"},"git_status":{"type":"string","enum":["ready","attention"]},"git_error":{"type":["string","null"]},"remote_change":{"type":["object","null"],"properties":{"ref":{"type":"string"},"observed_commit":{"type":"string"},"deleted":{"type":"boolean"},"received_at":{"type":"string","format":"date-time"}},"additionalProperties":false}},"required":["id","project_id","organization_id","name","revision","status","created_at"],"additionalProperties":false},"FileEntry":{"type":"object","properties":{"path":{"type":"string"},"type":{"type":"string","enum":["file","directory","symlink"]},"size_bytes":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"modified_at":{"type":"string","format":"date-time"},"revision":{"type":"string"},"git_ignored":{"type":"boolean"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 of stored file bytes; omitted for directories."}},"required":["path","type","revision"],"additionalProperties":false},"FileListing":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/FileEntry"}},"revision":{"type":"string"},"source":{"type":"string","enum":["active_workspace","checkpoint"]},"observed_at":{"type":"string","format":"date-time"},"next_cursor":{"type":["string","null"]}},"required":["entries","revision","source","observed_at","next_cursor"],"additionalProperties":false},"Checkpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"consistency":{"type":"string","enum":["crash_consistent","quiescent"]},"verification":{"type":"string","enum":["pending","verified","failed"]},"size_bytes":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"pinned":{"type":"boolean"},"git_commit":{"type":"string"},"git_status":{"type":"string","enum":["ready","attention"]},"git_error":{"type":["string","null"]}},"required":["id","workspace_id","created_at","consistency","verification","pinned"],"additionalProperties":false},"CheckpointCreate":{"type":"object","properties":{"pinned":{"type":"boolean"}},"required":[],"additionalProperties":false},"RestoreRequest":{"type":"object","properties":{"checkpoint_id":{"type":"string","format":"uuid"}},"required":["checkpoint_id"],"additionalProperties":false},"GitSync":{"type":"object","properties":{"workspace_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["disabled","pending","running","synced","already_integrated","conflict","blocked","failed"]},"source_commit":{"type":"string"},"target_commit":{"type":"string"},"conflicting_paths":{"type":"array","items":{"type":"string"}},"error_code":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"pull_request_url":{"type":"string","format":"uri"}},"required":["workspace_id","status","updated_at"],"additionalProperties":false},"Limits":{"type":"object","properties":{"timeout_seconds":{"type":"integer","minimum":1,"maximum":7200,"description":"Execution lifecycle timeout, capped by the current account policy: Starter 1800, Pro 3600, Scale 7200 seconds. Includes provisioning and persistence. Omission uses the smaller of 900 seconds and the account cap."},"max_cost_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Integer micro-USD as a decimal string.","default":"2000000"}},"required":[],"additionalProperties":false},"Grant":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"tools":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"required":["connection_id","tools"],"additionalProperties":false},"AgentCreate":{"type":"object","properties":{"name":{"type":"string"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"}},"required":["name","harness","model","billing_mode"],"additionalProperties":false},"AgentPatch":{"type":"object","properties":{"name":{"type":"string"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"}},"required":[],"additionalProperties":false},"Agent":{"type":"object","properties":{"name":{"type":"string"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"},"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"version":{"type":"integer"},"created_at":{"type":"string","format":"date-time"}},"required":["id","organization_id","name","harness","model","billing_mode","version","created_at"],"additionalProperties":false},"SessionCreate":{"type":"object","properties":{"workspace_id":{"type":"string","format":"uuid"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"}},"required":["workspace_id","harness","model","billing_mode"],"additionalProperties":false,"description":"Create a configured conversation without starting inference. BYOK requires a compatible provider_connection_id; runtime validates catalog and grants."},"Session":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"}},"required":["id","workspace_id","harness","model","created_at"],"additionalProperties":false},"RunCreate":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":100000},"project_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"harness":{"type":"string","enum":["codex","claude-code","opencode"]},"model":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed"]},"provider_connection_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"limits":{"$ref":"#/components/schemas/Limits"},"webhook_endpoint_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"queue_timeout_seconds":{"type":"integer","minimum":1,"maximum":86400,"description":"Maximum wait before execution starts, measured from submission. Shorten per request; never extends execution or retention."},"scheduling_class":{"type":"string","enum":["background","interactive"],"description":"Interactive work receives first consideration at a free slot; no preemption or immediate-capacity guarantee."},"queue_if_busy":{"type":"boolean","description":"Only session follow-ups can queue behind workspace work."}},"required":["prompt"],"additionalProperties":false,"oneOf":[{"required":["project_id"],"not":{"anyOf":[{"required":["workspace_id"]},{"required":["session_id"]}]}},{"required":["workspace_id"],"not":{"anyOf":[{"required":["project_id"]},{"required":["session_id"]}]}},{"required":["session_id"],"not":{"anyOf":[{"required":["project_id"]},{"required":["workspace_id"]}]}}],"description":"Exactly one project/workspace/session selector. A new session requires an agent preset or explicit harness and model. BYOK requires a compatible provider connection. Session harness is immutable. Runtime validates these ownership/catalog-dependent rules."},"MessageCreate":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":100000},"limits":{"$ref":"#/components/schemas/Limits"},"webhook_endpoint_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"queue_if_busy":{"type":"boolean","default":false},"model":{"type":"string","description":"Optional model override within the pinned harness catalog; never changes the active run."},"queue_timeout_seconds":{"type":"integer","minimum":1,"maximum":86400,"description":"Maximum wait before execution starts, measured from submission. Shorten per request; never extends execution or retention."},"scheduling_class":{"type":"string","enum":["background","interactive"],"description":"Interactive work receives first consideration at a free slot; no preemption or immediate-capacity guarantee."}},"required":["prompt"],"additionalProperties":false,"description":"Follow-up to pinned session configuration. queue_if_busy accepts ordered workspace work with a reserved budget, up to ten queued follow-ups. Default queue deadline is 24 hours; queue_timeout_seconds can shorten it. Authorization and current execution limits are revalidated before start."},"RunAccepted":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","provisioning","running"]},"urls":{"type":"object","properties":{"status":{"type":"string","format":"uri"},"events":{"type":"string","format":"uri"},"stream":{"type":"string","format":"uri"},"result":{"type":"string","format":"uri"},"cancel":{"type":"string","format":"uri","description":"POST to request cancellation."}},"required":["status","events","stream","result"],"additionalProperties":false},"queue_expires_at":{"type":"string","format":"date-time"},"wait_seconds":{"type":"number","minimum":0,"description":"Submission to execution start, or elapsed wait through now/completion if never started."},"waiting_reason":{"type":["string","null"],"enum":["global_capacity","account_concurrency","earlier_workspace_work","scheduler_turn","cancellation_requested","deadline_expired","workspace_unavailable",null],"description":"Snapshot, not a queue position or start-time estimate. Null when no longer queued."},"reserved_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Funds still held and unavailable for other jobs; released on settlement."},"scheduling_class":{"type":"string","enum":["background","interactive"]}},"required":["run_id","session_id","workspace_id","status","urls"],"additionalProperties":false},"Run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organization_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"harness":{"type":"string"},"model":{"type":"string"},"status":{"type":"string","enum":["queued","provisioning","running","waiting_for_input","persisting","succeeded","failed","cancelled","timed_out"]},"execution_outcome":{"type":"string","enum":["pending","success","failure","cancelled","timed_out","unknown"]},"persistence_status":{"type":"string","enum":["pending","verified","failed","not_required"]},"sync_status":{"type":"string","enum":["disabled","pending","synced","conflict","blocked","failed"]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"limits":{"$ref":"#/components/schemas/Limits"},"cost_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Integer micro-USD as a decimal string."},"queue_expires_at":{"type":"string","format":"date-time"},"failure_code":{"type":"string"},"client_type":{"type":"string","enum":["dashboard","cli","sdk","api","internal"]},"client_version":{"type":"string"},"wait_seconds":{"type":"number","minimum":0,"description":"Submission to execution start, or elapsed wait through now/completion if never started."},"waiting_reason":{"type":["string","null"],"enum":["global_capacity","account_concurrency","earlier_workspace_work","scheduler_turn","cancellation_requested","deadline_expired","workspace_unavailable",null],"description":"Snapshot, not a queue position or start-time estimate. Null when no longer queued."},"reserved_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Funds still held and unavailable for other jobs; released on settlement."},"scheduling_class":{"type":"string","enum":["background","interactive"]},"execution_deadline":{"type":["string","null"],"format":"date-time","description":"Set when execution is claimed. Includes provisioning and persistence; separate from the queue deadline."}},"required":["id","organization_id","session_id","workspace_id","harness","model","status","created_at"],"additionalProperties":false},"RunInput":{"type":"object","properties":{"input_request_id":{"type":"string","format":"uuid"},"answer":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."}},"required":["input_request_id","answer"],"additionalProperties":false},"RunResult":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"final":{"type":"boolean"},"output_text":{"type":"string"},"structured_output":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."},"artifact_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"checkpoint_id":{"type":"string","format":"uuid"},"execution_outcome":{"type":"string"},"persistence_status":{"type":"string"},"error":{"$ref":"#/components/schemas/ErrorDetail"},"content_expired":{"type":"boolean"},"content_expired_at":{"type":"string","format":"date-time"}},"required":["run_id","final","execution_outcome","persistence_status"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"schema_version":{"type":"integer","const":1},"run_id":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"type":{"type":"string"},"occurred_at":{"type":"string","format":"date-time"},"ingested_at":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."}},"required":["id","schema_version","run_id","sequence","type","occurred_at","ingested_at","data"],"additionalProperties":false},"Artifact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"run_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"media_type":{"type":"string"},"size_bytes":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"sha256":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","run_id","name","media_type","size_bytes","sha256"],"additionalProperties":false},"Download":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"ConnectionCreate":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","composio","search"]},"provider":{"type":"string","description":"For kind search: brave, exa, tavily, parallel, or firecrawl. All support BYOK with auth_method api_key and a write-only secret. Only brave supports managed search with auth_method none. Provider identity cannot be changed after creation."},"url":{"type":"string","format":"uri"},"auth_method":{"type":"string","enum":["oauth","bearer","headers","api_key","none"]},"secret":{"type":"string","description":"Write-only secret; never returned.","writeOnly":true},"secret_headers":{"type":"object","additionalProperties":{"type":"string","writeOnly":true},"writeOnly":true},"package":{"type":"string"},"package_version":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"subject_id":{"type":"string"},"secret_env":{"type":"object","additionalProperties":{"type":"string"},"writeOnly":true,"description":"Write-only environment secrets for approved stdio package variables. Visible to processes inside your agent sandbox."}},"required":["name","kind","auth_method"],"additionalProperties":false},"ConnectionPatch":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","composio","search"]},"provider":{"type":"string","description":"For kind search: brave, exa, tavily, parallel, or firecrawl. All support BYOK with auth_method api_key and a write-only secret. Only brave supports managed search with auth_method none. Provider identity cannot be changed after creation."},"url":{"type":"string","format":"uri"},"auth_method":{"type":"string","enum":["oauth","bearer","headers","api_key","none"]},"secret":{"type":"string","description":"Write-only secret; never returned.","writeOnly":true},"secret_headers":{"type":"object","additionalProperties":{"type":"string","writeOnly":true},"writeOnly":true},"package":{"type":"string"},"package_version":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},"subject_id":{"type":"string"},"secret_env":{"type":"object","additionalProperties":{"type":"string"},"writeOnly":true,"description":"Write-only environment secrets for approved stdio package variables. Visible to processes inside your agent sandbox."}},"required":[],"additionalProperties":false},"Connection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","github","composio","search"]},"provider":{"type":"string","description":"For kind search: brave, exa, tavily, parallel, or firecrawl. All support BYOK with auth_method api_key and a write-only secret. Only brave supports managed search with auth_method none. Provider identity cannot be changed after creation."},"url":{"type":"string","format":"uri"},"auth_method":{"type":"string"},"status":{"type":"string","enum":["pending","healthy","expired","error"]},"owner_subject_id":{"type":"string"},"last_checked_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"package":{"type":"string"},"package_version":{"type":"string"}},"required":["id","name","kind","auth_method","status","created_at"],"additionalProperties":false},"AuthorizeRequest":{"type":"object","properties":{"return_to":{"type":"string","description":"Application-relative allowlisted return location."}},"required":[],"additionalProperties":false},"AuthorizationLink":{"type":"object","properties":{"authorization_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["authorization_url","expires_at"],"additionalProperties":false},"ConnectionTest":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","error","unknown"]},"observed_at":{"type":"string","format":"date-time"},"diagnostic_code":{"type":"string"},"message":{"type":"string"}},"required":["status","observed_at"],"additionalProperties":false},"Tool":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."},"granted":{"type":"boolean"}},"required":["name","input_schema","granted"],"additionalProperties":false},"KeyCreate":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string","format":"uuid"},"expires_at":{"type":"string","format":"date-time"}},"required":["name","scopes"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string","format":"uuid"},"last_used_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"revoked_at":{"type":"string","format":"date-time"}},"required":["id","name","prefix","scopes"],"additionalProperties":false},"NewApiKey":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"project_id":{"type":"string","format":"uuid"},"last_used_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"revoked_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"Displayed once at creation; never returned again.","readOnly":true}},"required":["id","name","prefix","scopes","secret"],"additionalProperties":false},"WebhookCreate":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","git_sync.updated","connection.expired"]}}},"required":["url","events"],"additionalProperties":false},"WebhookPatch":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","git_sync.updated","connection.expired"]}},"enabled":{"type":"boolean"}},"required":[],"additionalProperties":false},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","git_sync.updated","connection.expired"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}},"required":["id","url","events","enabled","created_at"],"additionalProperties":false},"NewWebhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["run.completed","run.failed","run.cancelled","git_sync.updated","connection.expired"]}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"signing_secret":{"type":"string","description":"Shown only once; encrypted at rest.","readOnly":true}},"required":["id","url","events","enabled","created_at","signing_secret"],"additionalProperties":false},"Delivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"event_id":{"type":"string","format":"uuid"},"endpoint_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","delivered","retrying","exhausted"]},"attempts":{"type":"integer"},"last_status_code":{"type":"integer"},"next_attempt_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["id","event_id","endpoint_id","status","attempts","created_at"],"additionalProperties":false},"Billing":{"type":"object","properties":{"plan":{"type":"string","enum":["payg","pro","scale"]},"available_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Integer micro-USD as a decimal string."},"reserved_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Integer micro-USD as a decimal string."},"rate_card_version":{"type":"string"},"currency":{"type":"string","const":"USD"},"concurrency_limit":{"type":"integer"},"storage_allowance_bytes":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"outstanding_micro_usd":{"type":"string","pattern":"^[0-9]+$"},"billing_hold":{"type":"boolean"},"billing_status":{"type":"string"},"subscription_price_micro_usd":{"type":"string","pattern":"^[0-9]+$"},"credit_lots":{"type":"array","items":{"$ref":"#/components/schemas/CreditLot"}},"execution_policy":{"$ref":"#/components/schemas/ExecutionPolicy"},"plans":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}},"required":["plan","available_micro_usd","reserved_micro_usd","rate_card_version","currency","concurrency_limit","storage_allowance_bytes"],"additionalProperties":false},"CheckoutCreate":{"type":"object","properties":{"kind":{"type":"string","enum":["topup","subscription"]},"amount_micro_usd":{"type":"string","pattern":"^[0-9]+$","description":"Integer micro-USD as a decimal string."},"plan":{"type":"string","enum":["pro","scale"]}},"required":["kind"],"additionalProperties":false,"description":"Server validates purchased-credit minimum of 10000000 micro-USD and selects Stripe price IDs. Client cannot override currency, redirect domains or unit rates. Subscriptions default to pro for older clients. Existing subscribers change tiers in the Stripe portal. Upgrades do not grant extra included credits until a regular subscription-cycle invoice is paid."},"Redirect":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["url","expires_at"],"additionalProperties":false},"Harness":{"type":"object","properties":{"id":{"type":"string","enum":["codex","claude-code","opencode"]},"version":{"type":"string"},"enabled":{"type":"boolean"},"capabilities":{"type":"array","items":{"type":"string"}}},"required":["id","version","enabled","capabilities"],"additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"harnesses":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"billing_modes":{"type":"array","items":{"type":"string","enum":["byok","managed"]}},"rate_card_version":{"type":"string"}},"required":["id","provider","harnesses","enabled","billing_modes","rate_card_version"],"additionalProperties":false},"RequestRecord":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"started_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"organization_id":{"type":"string","format":"uuid"},"principal_type":{"type":"string","enum":["human","service","anonymous","operator","synthetic"]},"principal_id":{"type":"string"},"method":{"type":"string"},"route":{"type":"string"},"status_code":{"type":"integer"},"duration_ms":{"type":"number"},"run_id":{"type":"string","format":"uuid"},"idempotency_outcome":{"type":"string","enum":["new","replay","conflict","none"]},"error_code":{"type":"string"},"client_type":{"type":"string","enum":["dashboard","cli","sdk","api","internal"]},"client_version":{"type":"string"}},"required":["request_id","started_at","principal_type","method","route"],"additionalProperties":false},"Metric":{"type":"object","properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"null"}]},"unit":{"type":"string"},"dimensions":{"type":"object","additionalProperties":{"type":"string"}},"status":{"type":"string","enum":["known","estimated","missing","insufficient_data"]},"sample_size":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."}},"required":["name","value","unit","status"],"additionalProperties":false},"Report":{"type":"object","properties":{"definition_version":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"timezone":{"type":"string","const":"UTC"},"observed_at":{"type":"string","format":"date-time"},"complete_through":{"type":"string","format":"date-time"},"missing_sources":{"type":"array","items":{"type":"string"}},"filters":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}},"evidence_urls":{"type":"array","items":{"type":"string","format":"uri"}},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/Recommendation"}},"scheduling":{"$ref":"#/components/schemas/SchedulingReport"}},"required":["definition_version","from","to","timezone","observed_at","missing_sources","filters","metrics"],"additionalProperties":false},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"plan":{"type":"string","enum":["payg","pro","scale"]},"member_count":{"type":"string","pattern":"^[0-9]+$","description":"Non-negative integer count as a decimal string."},"activated_at":{"type":"string","format":"date-time"},"last_active_at":{"type":"string","format":"date-time"},"contact_email":{"type":"string","format":"email","description":"Omitted unless accounts:pii:read is granted and requested."}},"required":["id","name","created_at","plan","member_count"],"additionalProperties":false},"AccountSummary":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"billing":{"$ref":"#/components/schemas/Billing"},"usage":{"$ref":"#/components/schemas/Report"},"health":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}}},"required":["account","billing","usage","health"],"additionalProperties":false},"Diagnostics":{"type":"object","properties":{"run_id":{"type":"string","format":"uuid"},"status":{"type":"string"},"observed_at":{"type":"string","format":"date-time"},"lease_status":{"type":"string"},"checkpoint_status":{"type":"string"},"error_codes":{"type":"array","items":{"type":"string"}},"request_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["run_id","status","observed_at","error_codes"],"additionalProperties":false},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string","format":"uuid"},"retryable":{"type":"boolean"},"details":{"type":"object","additionalProperties":true,"description":"Versioned metadata; secrets and unbounded arbitrary payloads are prohibited."}},"required":["code","message","request_id","retryable"],"additionalProperties":false},"Recommendation":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"string"},"summary":{"type":"string"},"evidence_metric_names":{"type":"array","items":{"type":"string"}},"sample_size":{"type":"string","pattern":"^[0-9]+$"},"suggested_action":{"type":"string"},"action_executed":{"type":"boolean","const":false}},"required":["code","summary","evidence_metric_names","suggested_action","action_executed"]},"ConnectionGrantSet":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"integer","minimum":1},"subject_type":{"type":"string","enum":["organization","user","external_subject"]},"subject_id":{"type":"string"},"tools":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"required":["version","subject_type","tools"],"description":"Compare-and-set grant revision. Subject ownership and granting authority are validated server-side."},"CheckpointPatch":{"type":"object","properties":{"pinned":{"type":"boolean"}},"required":["pinned"],"additionalProperties":false},"WorkspaceSource":{"oneOf":[{"type":"object","properties":{"kind":{"const":"git_ref"},"ref":{"type":"string","minLength":1}},"required":["kind","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"const":"checkpoint"},"checkpoint_id":{"type":"string","format":"uuid"}},"required":["kind","checkpoint_id"],"additionalProperties":false}],"description":"Resolve within the authorized project to an immutable commit/checkpoint before creating the clone."},"WorkspacePatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"CliCapabilities":{"type":"object","properties":{"api_version":{"type":"string"},"minimum_cli_version":{"type":"string"},"recommended_cli_version":{"type":"string"},"features":{"type":"array","items":{"type":"string"}},"stream_rotation_seconds":{"type":"integer","const":55},"max_transfer_files":{"type":"integer","const":1000},"max_transfer_bytes":{"type":"integer","const":262144000},"max_file_bytes":{"type":"integer","const":26214400}},"required":["api_version","minimum_cli_version","recommended_cli_version","features","stream_rotation_seconds","max_transfer_files","max_transfer_bytes","max_file_bytes"],"additionalProperties":false},"Identity":{"type":"object","properties":{"principal_id":{"type":"string","format":"uuid"},"principal_type":{"type":"string","enum":["user","api_key"]},"user_id":{"type":"string","format":"uuid"},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["id","name","role"],"additionalProperties":false}},"effective_scopes":{"type":"array","items":{"type":"string"}},"project_restrictions":{"type":"array","items":{"type":"string","format":"uuid"}},"capabilities":{"$ref":"#/components/schemas/CliCapabilities"},"organization_id":{"type":"string","format":"uuid"}},"required":["principal_id","principal_type","organizations","effective_scopes","project_restrictions","capabilities"],"additionalProperties":false},"DiffEntry":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."},"change":{"type":"string","enum":["added","modified","deleted","type_changed"]},"before_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."},"after_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."},"binary":{"type":["boolean","null"],"description":"Whether inspected content contains binary bytes. Null means inspection was skipped because the two recorded file sizes total 512,000 bytes or more; no file content is loaded and no patch is returned."},"patch":{"type":"string","maxLength":1048576}},"required":["path","change","before_sha256","after_sha256","binary"],"additionalProperties":false},"WorkspaceDiff":{"type":"object","properties":{"workspace_id":{"type":"string","format":"uuid"},"base_checkpoint_id":{"type":"string","format":"uuid"},"revision":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/DiffEntry"}},"next_cursor":{"type":["string","null"]},"truncated":{"type":"boolean"}},"required":["workspace_id","revision","data","next_cursor","truncated"],"additionalProperties":false},"TransferManifestEntry":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."},"local_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."},"local_size_bytes":{"type":"integer","minimum":0,"maximum":26214400},"baseline_known":{"type":"boolean"},"baseline_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."}},"required":["path","local_sha256","local_size_bytes","baseline_known","baseline_sha256"],"additionalProperties":false,"description":"Explicit absent local file has null hash and zero bytes. baseline_known=false is distinct from a known absent baseline. Regular-file transfers only; reject symlink/device/directory conflicts. Runtime validates unique normalized paths and consistent hashes/sizes."},"TransferCreate":{"type":"object","properties":{"direction":{"type":"string","enum":["push","pull"]},"base_revision":{"type":"string","minLength":1},"manifest":{"type":"array","items":{"$ref":"#/components/schemas/TransferManifestEntry"},"maxItems":1000},"paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."},"maxItems":1000},"include_ignored":{"type":"boolean","default":false},"delete":{"type":"boolean","default":false},"dry_run":{"type":"boolean","default":false}},"required":["direction","base_revision","manifest","paths"],"additionalProperties":false,"description":"Create an expiring plan, not a filesystem mutation. Empty paths selects default permitted scope. Explicit paths required with include_ignored. Manifest is the complete selected local regular-file inventory plus tombstones; runtime validates aggregate 250 MiB cap. Dry-run receives no upload/download grants and cannot apply.","allOf":[{"if":{"properties":{"include_ignored":{"const":true}},"required":["include_ignored"]},"then":{"properties":{"paths":{"minItems":1}}}}]},"TransferAction":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."},"action":{"type":"string","enum":["upload","download","delete","unchanged","conflict"]},"local_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."},"remote_sha256":{"type":["string","null"],"pattern":"^[a-f0-9]{64}$","description":"SHA-256 of a regular file; null means absent."},"size_bytes":{"type":"string","pattern":"^[0-9]+$"},"conflict_reason":{"type":"string"},"url":{"type":"string","format":"uri"},"url_expires_at":{"type":"string","format":"date-time"},"method":{"type":"string","enum":["PUT","GET"]},"required_headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["path","action","local_sha256","remote_sha256"],"additionalProperties":false,"description":"URLs are temporary bearer capabilities scoped to one object/hash; suppress from logs. Conflicts have no write grant. Never forward a platform Authorization header to an object URL."},"Transfer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"direction":{"type":"string","enum":["push","pull"]},"base_revision":{"type":"string"},"status":{"type":"string","enum":["planned","staging","ready","applying","succeeded","conflicted","expired","failed"]},"dry_run":{"type":"boolean"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/TransferAction"}},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"operation_id":{"type":"string","format":"uuid"},"result_revision":{"type":"string"},"checkpoint_id":{"type":"string","format":"uuid"},"local_receipt_complete":{"type":"boolean"}},"required":["id","workspace_id","direction","base_revision","status","dry_run","actions","expires_at","created_at"],"additionalProperties":false},"TransferApply":{"type":"object","properties":{"expected_revision":{"type":"string"},"completed_paths":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4096,"description":"Normalized relative POSIX path; runtime rejects traversal, NUL, absolute paths, unsafe links and reserved internal paths."},"maxItems":1000}},"required":["expected_revision"],"additionalProperties":false,"description":"Push: verify staged bytes, recheck revision/writer, create and checkpoint replacement, atomically switch. Pull: completed_paths is an untrusted client receipt of local work, never proof of remote mutation; the remote snapshot stays unchanged. Partial receipts remain resumable. A dry-run, expired, or conflicted plan cannot apply."},"CheckpointExportRequest":{"type":"object","properties":{"format":{"type":"string","enum":["git_bundle","portable_archive"]}},"required":["format"],"additionalProperties":false},"CheckpointExport":{"type":"object","properties":{"checkpoint_id":{"type":"string","format":"uuid"},"format":{"type":"string","enum":["git_bundle","portable_archive"]},"download_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"},"size_bytes":{"type":"string","pattern":"^[0-9]+$"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"manifest_url":{"type":"string","format":"uri"},"manifest_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"source_commit":{"type":"string"},"export_commit":{"type":"string","description":"Git bundle review commit containing permitted checkpoint edits; may differ from source_commit. Does not mutate hosted branch."}},"required":["checkpoint_id","format","download_url","expires_at","size_bytes","sha256","manifest_url","manifest_sha256"],"additionalProperties":false,"description":"Tenant-authorized, short-lived download capabilities. Git bundle contains tracked objects/refs only; portable archive includes permitted ignored files and sanitized session state, never infrastructure credentials or archive keys. Expired links require a new idempotent export request."},"ExportOperation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","succeeded","failed"]},"kind":{"const":"checkpoint_export"},"result":{"$ref":"#/components/schemas/CheckpointExport"},"error":{"$ref":"#/components/schemas/ErrorDetail"},"created_at":{"type":"string","format":"date-time"}},"required":["id","status","kind","created_at"],"additionalProperties":false,"allOf":[{"if":{"properties":{"status":{"const":"succeeded"}},"required":["status"]},"then":{"required":["result"]}}]},"GithubInstallations":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"installation_id":{"type":"string"},"account_login":{"type":"string"}},"required":["installation_id","account_login"],"additionalProperties":false}},"install_url":{"type":"string","format":"uri"},"truncated":{"type":"boolean"}},"required":["data","install_url","truncated"],"additionalProperties":false},"GithubRepositories":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"repository_id":{"type":"string"},"full_name":{"type":"string"},"default_branch":{"type":"string"}},"required":["repository_id","full_name","default_branch"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["data","truncated"],"additionalProperties":false},"CreditLot":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"remaining_micro_usd":{"type":"string","pattern":"^[0-9]+$"},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["id","kind","remaining_micro_usd","expires_at"],"additionalProperties":false},"StdioPackage":{"type":"object","properties":{"package":{"type":"string"},"version":{"type":"string"},"label":{"type":"string"},"environment_keys":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"string"}}},"required":["package","version","label","environment_keys","tools"],"additionalProperties":false},"StdioPackagePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StdioPackage"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"OrganizationCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["id","name"],"additionalProperties":false},"Member":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["user_id","name","email","role"],"additionalProperties":false},"MemberPatch":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member","viewer"]}},"required":["role"],"additionalProperties":false},"InvitationCreate":{"type":"object","properties":{"email":{"type":"string","format":"email","maxLength":320},"role":{"type":"string","enum":["admin","member","viewer"]}},"required":["email","role"],"additionalProperties":false},"Invitation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member","viewer"]},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"invite_url":{"type":"string","format":"uri"}},"required":["id","email","role","created_at","expires_at"],"additionalProperties":false},"OrganizationAudit":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"actor_id":{"type":"string"},"action":{"type":"string"},"subject_id":{"type":["string","null"]},"data":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time"}},"required":["id","actor_id","action","subject_id","data","created_at"],"additionalProperties":false},"StoragePolicy":{"type":"object","properties":{"overage_enabled":{"type":"boolean"},"monthly_budget_micro_usd":{"type":"string","pattern":"^[0-9]+$","maxLength":12}},"required":["overage_enabled","monthly_budget_micro_usd"],"additionalProperties":false},"Storage":{"type":"object","properties":{"physical_bytes":{"type":"string"},"object_count":{"type":"string"},"allowance_bytes":{"type":"string"},"observed_at":{"type":["string","null"],"format":"date-time"},"overage_enabled":{"type":"boolean"},"monthly_budget_micro_usd":{"type":"string"},"over_quota":{"type":"boolean"},"rate_micro_usd_per_gib_month":{"type":"string"},"retention":{"type":"object","properties":{"all_hours":{"type":"integer"},"daily_days":{"type":"integer"},"weekly_weeks":{"type":"integer"},"unreferenced_grace_days":{"type":"integer"}},"additionalProperties":false}},"required":["physical_bytes","allowance_bytes","observed_at","overage_enabled","over_quota","monthly_budget_micro_usd"],"additionalProperties":false},"ProjectDeletion":{"type":"object","properties":{"confirmation":{"type":"string","minLength":1,"maxLength":200},"password":{"type":"string","maxLength":256,"writeOnly":true}},"required":["confirmation"],"additionalProperties":false},"ReportSnapshot":{"type":"object","required":["day","observed_at","report"],"properties":{"day":{"type":"string","format":"date"},"observed_at":{"type":"string","format":"date-time"},"report":{"$ref":"#/components/schemas/Report"}}},"ReportSnapshotPage":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReportSnapshot"}},"next_cursor":{"type":["string","null"],"format":"date"}}},"Plan":{"type":"object","properties":{"id":{"type":"string","enum":["payg","pro","scale"]},"name":{"type":"string"},"monthly_price_micro_usd":{"type":"string"},"included_credit_micro_usd":{"type":"string"},"concurrency_limit":{"type":"integer"},"max_timeout_seconds":{"type":"integer"},"scheduler_weight":{"type":"integer"},"storage_gib":{"type":"integer"},"history_days":{"type":"integer"}},"required":["id","name","monthly_price_micro_usd","included_credit_micro_usd","concurrency_limit","max_timeout_seconds","scheduler_weight","storage_gib","history_days"],"additionalProperties":false},"ExecutionPolicy":{"type":"object","properties":{"plan":{"type":"string","enum":["payg","pro","scale"]},"plan_name":{"type":"string"},"concurrency_limit":{"type":"integer"},"max_timeout_seconds":{"type":"integer"},"plan_concurrency_limit":{"type":"integer"},"plan_max_timeout_seconds":{"type":"integer"},"default_queue_timeout_seconds":{"type":"integer"},"concurrency_override":{"type":["integer","null"]},"timeout_override_seconds":{"type":["integer","null"]}},"required":["plan","plan_name","concurrency_limit","max_timeout_seconds","plan_concurrency_limit","plan_max_timeout_seconds","default_queue_timeout_seconds","concurrency_override","timeout_override_seconds"],"additionalProperties":false},"ExecutionPolicyPatch":{"type":"object","properties":{"concurrency_limit":{"type":["integer","null"],"minimum":1,"maximum":50,"description":"Null restores plan default. An integer must not exceed the current plan limit."},"max_timeout_seconds":{"type":["integer","null"],"minimum":1,"maximum":7200,"description":"Null restores plan default. Changes affect new starts, never interrupt running work."}},"minProperties":1,"additionalProperties":false},"SchedulingAccount":{"type":"object","properties":{"organization_id":{"type":"string","format":"uuid"},"active_executions":{"type":"integer"},"starts":{"type":"integer"},"queued_jobs":{"type":"integer"},"eligible_queued_jobs":{"type":"integer"},"oldest_eligible_wait_seconds":{"type":"number"},"mean_start_wait_seconds":{"type":["number","null"]},"p95_start_wait_seconds":{"type":["number","null"]}},"required":["organization_id","active_executions","starts","queued_jobs","eligible_queued_jobs","oldest_eligible_wait_seconds","mean_start_wait_seconds","p95_start_wait_seconds"],"additionalProperties":false},"SchedulingReport":{"type":"object","properties":{"observed_at":{"type":"string","format":"date-time"},"global_concurrency_limit":{"type":"integer"},"active_executions":{"type":"integer"},"eligible_queued_jobs":{"type":"integer"},"queued_jobs":{"type":"integer"},"starts":{"type":"integer"},"accounts_limit":{"type":"integer"},"oldest_eligible_wait_seconds":{"type":"number"},"mean_start_wait_seconds":{"type":["number","null"]},"p95_start_wait_seconds":{"type":["number","null"]},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/SchedulingAccount"}}},"required":["observed_at","global_concurrency_limit","active_executions","eligible_queued_jobs","queued_jobs","starts","accounts_limit","oldest_eligible_wait_seconds","mean_start_wait_seconds","p95_start_wait_seconds","accounts"],"additionalProperties":false},"ConnectorCatalogEntry":{"type":"object","additionalProperties":false,"required":["slug","name","description","logo","categories","tool_count","connectable"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"logo":{"type":"string","format":"uri"},"categories":{"type":"array","items":{"type":"string"}},"tool_count":{"type":"integer","minimum":0},"connectable":{"type":"boolean","description":"Operator auth config, version pin and callback verification are configured. This is not proof of user authorization or successful live execution."}}},"ConnectorCatalog":{"type":"object","additionalProperties":false,"required":["data","source","updated_at"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectorCatalogEntry"}},"source":{"type":"string","enum":["live","snapshot"]},"updated_at":{"type":"string","format":"date-time"}}}},"parameters":{"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"From":{"name":"from","in":"query","schema":{"type":"string","format":"date-time"},"description":"Inclusive interval start; default trailing 7 days."},"To":{"name":"to","in":"query","schema":{"type":"string","format":"date-time"},"description":"Exclusive interval end; default now."},"GroupBy":{"name":"group_by","in":"query","schema":{"type":"string","enum":["day","hour","organization","model","provider","harness","billing_mode"]},"description":"Unsupported metric/group combinations return invalid_request."},"Idempotency":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":200}},"IfMatch":{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","description":"Previously observed revision/ETag."}},"FilePath":{"name":"path","in":"query","required":true,"schema":{"type":"string","description":"Normalized relative POSIX path."}}},"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"Organization-scoped API key"},"DashboardSession":{"type":"apiKey","in":"cookie","name":"__Secure-session","description":"Configured Better Auth session cookie, with browser CSRF/origin validation."},"OperatorOAuth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://api.example.com/auth/oauth2/authorize","tokenUrl":"https://api.example.com/auth/oauth2/token","scopes":{"metrics:read":"Read growth and usage","operations:read":"Read infrastructure and execution diagnostics","accounts:read":"Read account summaries","accounts:pii:read":"Read scoped account contacts"}},"clientCredentials":{"tokenUrl":"https://api.example.com/auth/oauth2/token","scopes":{"metrics:read":"Read growth and usage","operations:read":"Read infrastructure and execution diagnostics","accounts:read":"Read account summaries","accounts:pii:read":"Read scoped account contacts"}}},"description":"Registered platform operators only; validate distinct REST resource audience."},"CustomerOAuth":{"type":"oauth2","description":"Customer API resource audience, verified human/device grant and membership. No operator scopes. Device authorization uses RFC 8628; OpenAPI represents the server with authorizationCode because 3.1 has no native device flow type.","x-device-authorization-url":"https://api.example.com/auth/device/code","x-device-grant-type":"urn:ietf:params:oauth:grant-type:device_code","flows":{"authorizationCode":{"authorizationUrl":"https://api.example.com/auth/oauth2/authorize","tokenUrl":"https://api.example.com/auth/oauth2/token","scopes":{"identity:read":"Inspect current principal and authorized organizations","projects:read":"Read authorized projects/workspaces","projects:write":"Manage authorized projects/workspaces","files:read":"Read files, checkpoints and exports","files:write":"Edit, transfer and restore files or synchronize Git","runs:read":"Read agents, sessions, runs and events","runs:write":"Configure agents/sessions, submit/input/cancel runs","connections:read":"Inspect authorized connections and tools","connections:write":"Create/authenticate/test/change connections and grants","usage:read":"Read tenant request/usage/billing state","billing:write":"Manage authorized checkout and billing portal","keys:write":"Manage API keys within creator authority","webhooks:read":"Inspect authorized webhooks","webhooks:write":"Manage webhook subscriptions/deliveries","offline_access":"Rotating refresh token","organizations:read":"Read team membership","organizations:write":"Manage organizations, roles and invitations","projects:delete":"Schedule or cancel permanent project deletion (owner/admin only)"}}}}}},"x-design-status":"implemented-local-validation"}