{"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://staging.macrofold.ai"}],"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":"Optionally expand persistent connection eligibility. include_connections=true requires connections:read; counterpart and pagination parameters require that flag. Unspecified context is a browsing wildcard, not a custom run.","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."},{"name":"include_connections","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"connections_limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"connections_cursor","in":"query","required":false,"schema":{"type":"string"}}],"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."},{"name":"recursive","in":"query","description":"List all matching files by default. Set false to return only direct children of path, including directories derived from persisted files.","schema":{"type":"boolean","default":true}}],"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":"Returns the complete bytes of a regular file from the latest published workspace revision, including empty and binary files. Supply a workspace-relative path and a credential with files:read access to the project. Wait for run execution and persistence before reading agent edits; active runs expose the last published revision. Direct reads are limited to 4 MiB and larger files return 413 without truncation. Use download=true for a short-lived streaming download URL. Symlinks are not followed. The ETag identifies the observed workspace revision.","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."},{"name":"create_only","in":"query","description":"Reject an existing file or directory at path instead of replacing it. The collision check is atomic with the revision update.","schema":{"type":"boolean","default":false}}],"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"]},"patch":{"operationId":"renameFile","summary":"Rename a workspace file","tags":["workspaces"],"description":"Move a persisted file or symlink to new_path in one verified checkpoint. Does not overwrite an existing file or directory and does not follow symlinks. Requires the current workspace revision and an idle 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"}}}}},"x-required-scopes":["files:write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRename"}}}}}},"/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."},{"name":"query","in":"query","schema":{"type":"string","maxLength":200},"description":"Search preset names."}],"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":"Optionally expand persistent connection eligibility. include_connections=true requires connections:read; counterpart and pagination parameters require that flag. Unspecified context is a browsing wildcard, not a custom run.","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."},{"name":"include_connections","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"connections_limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"connections_cursor","in":"query","required":false,"schema":{"type":"string"}}],"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."},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextualConnectionPage"}}}},"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/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"]}},"/v1/triggers":{"get":{"operationId":"listTriggers","summary":"List triggers and scheduled tasks","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:read"]}],"x-required-scopes":["triggers:read"],"parameters":[{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"kind","in":"query","schema":{"type":"string","enum":["slack","webhook","schedule"]}},{"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/Trigger"}},"next_cursor":{"type":["string","null"]},"quota":{"type":"object","description":"Organization-wide saved-trigger capacity, including paused definitions. Independent of delivery and execution limits.","properties":{"limit":{"type":"integer","minimum":0},"used":{"type":"integer","minimum":0},"remaining":{"type":"integer","minimum":0}},"required":["limit","used","remaining"],"additionalProperties":false}},"required":["data","next_cursor","quota"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTrigger","summary":"Create a trigger or scheduled task","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write","runs:write","runs:read","projects:read"]}],"x-required-scopes":["triggers:write","runs:write","runs:read","projects:read"],"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/NewTrigger"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCreate"}}}}}},"/v1/triggers/{trigger_id}":{"get":{"operationId":"getTrigger","summary":"Inspect a trigger","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:read"]}],"x-required-scopes":["triggers:read"],"parameters":[{"name":"trigger_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/Trigger"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateTrigger","summary":"Edit or pause a trigger","description":"Only the creator can edit/resume. Organization administrators can pause. Editing configuration invalidates deliveries that have not yet become runs.","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write"]}],"x-required-scopes":["triggers:write"],"parameters":[{"name":"trigger_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/Trigger"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerPatch"}}}}},"delete":{"operationId":"deleteTrigger","summary":"Delete a trigger; preserve accepted runs","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write"]}],"x-required-scopes":["triggers:write"],"parameters":[{"name":"trigger_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":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/triggers/{trigger_id}/rotate-secret":{"post":{"operationId":"rotateTriggerSecret","summary":"Rotate the incoming webhook secret","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write"]}],"x-required-scopes":["triggers:write"],"parameters":[{"name":"trigger_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/TriggerSecret"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/triggers/{trigger_id}/deliveries":{"get":{"operationId":"listTriggerDeliveries","summary":"List trigger deliveries and linked runs","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:read"]}],"x-required-scopes":["triggers:read"],"parameters":[{"name":"trigger_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/TriggerDelivery"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/triggers/{trigger_id}/run":{"post":{"operationId":"runTrigger","summary":"Run a scheduled task now","description":"","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write"]}],"x-required-scopes":["triggers:write"],"parameters":[{"name":"trigger_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/TriggerDelivery"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/triggers/{trigger_id}/deliveries/{delivery_id}/retry-reply":{"post":{"operationId":"retryTriggerReply","summary":"Retry a failed or uncertain Slack reply","description":"Check Slack for an existing message before retrying an uncertain reply. This never reruns the agent.","tags":["triggers"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["triggers:write"]}],"x-required-scopes":["triggers:write"],"parameters":[{"name":"trigger_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerDelivery"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"required":[],"additionalProperties":false}}}}}},"/v1/slack-connections":{"get":{"operationId":"listSlackConnections","summary":"List your Slack bot connections","description":"","tags":["slack-connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["connections: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/SlackConnection"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSlackConnection","summary":"Connect a customer-owned Slack bot","description":"","tags":["slack-connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["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":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConnection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackConnectionCreate"}}}}}},"/v1/slack-connections/{connection_id}":{"delete":{"operationId":"deleteSlackConnection","summary":"Disconnect a Slack bot and pause its triggers","description":"","tags":["slack-connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["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":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/slack-connections/{connection_id}/channels":{"get":{"operationId":"listSlackConnectionChannels","summary":"List channels the bot has joined","description":"","tags":["slack-connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["connections:write"],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"cursor","in":"query","schema":{"type":"string","maxLength":1000}},{"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/SlackChannel"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspaces/{workspace_id}/folders":{"post":{"operationId":"createFolder","summary":"Create a workspace folder","tags":["workspaces"],"description":"Persist an empty folder by creating a conventional .gitkeep file inside it. Rejects an existing file or directory. The marker is part of checkpoints and restores, and follows normal Git ignore rules. Requires the current workspace revision and an idle writer.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$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"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}}}}},"/v1/projects/{project_id}/worktree-options":{"get":{"operationId":"getWorktreeOptions","summary":"List saved branches and validate worktree names","tags":["projects"],"description":"Read-only validation. Creation rechecks names and branches under the project lock. Branches come from saved project repositories.","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."},{"name":"name","in":"query","schema":{"type":"string","maxLength":151}},{"name":"branch","in":"query","schema":{"type":"string","maxLength":151}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorktreeOptions"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["projects:read"]}},"/v1/workspaces/{workspace_id}/files/duplicate":{"post":{"operationId":"duplicateFile","summary":"Duplicate a file","tags":["workspaces"],"description":"Copies a saved file or symlink without following it. Requires the current revision; refuses an existing destination.","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:write"]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$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"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDuplicate"}}}}}},"/v1/connections/{connection_id}/access":{"get":{"operationId":"getConnectionAccess","summary":"Inspect owned connection access","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"x-required-scopes":["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/ConnectionAccess"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateConnectionAccess","summary":"Update organization access or approved tools","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["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."},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","pattern":"^\"[1-9][0-9]*\"$"}},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccess"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessPatch"}}}}}},"/v1/connections/{connection_id}/access/rules":{"get":{"operationId":"listConnectionAccessRules","summary":"List saved connection permissions","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"x-required-scopes":["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."},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"name":"project_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["project","agent","created_at"]}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRulePage"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createConnectionAccessRule","summary":"Add a connection permission","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["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."},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","pattern":"^\"[1-9][0-9]*\"$"}},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRuleMutation"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRuleInput"}}}}}},"/v1/connections/{connection_id}/access/rules/{rule_id}":{"patch":{"operationId":"updateConnectionAccessRule","summary":"Retarget a connection permission","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["connections:write"],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rule_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."},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","pattern":"^\"[1-9][0-9]*\"$"}},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRuleMutation"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRuleInput"}}}}},"delete":{"operationId":"deleteConnectionAccessRule","summary":"Remove a connection permission","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write"]}],"x-required-scopes":["connections:write"],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rule_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."},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string","pattern":"^\"[1-9][0-9]*\"$"}},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessRuleDeleted"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connection-access/resolve":{"post":{"operationId":"resolveConnectionAccess","summary":"Preview connection access for a run","tags":["connections"],"security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"x-required-scopes":["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."},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessResolutionPage"}}},"headers":{"ETag":{"schema":{"type":"string"},"description":"Current quoted connection access version."}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionAccessResolve"}}}}}},"/v1/integration-paths/customer-agents/{customer_id}":{"post":{"operationId":"ensureCustomerAgent","summary":"Get or create a customer-agent binding","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:write","runs:write"]}],"x-required-scopes":["projects:write","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"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":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentBinding"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentEnsure"}}}}},"get":{"operationId":"listCustomerAgents","summary":"List one customer’s agent bindings","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"x-required-scopes":["projects:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"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":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}":{"get":{"operationId":"getCustomerAgent","summary":"Get a customer-agent binding","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["projects:read"]}],"x-required-scopes":["projects:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentBinding"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/messages":{"post":{"operationId":"sendCustomerAgentMessage","summary":"Send a customer-agent message","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"x-required-scopes":["runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"202":{"description":"Successful integration-path 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/CustomerAgentMessage"}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/conversations":{"get":{"operationId":"listCustomerAgentConversations","summary":"List this agent’s conversations","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"x-required-scopes":["runs:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/runs/{run_id}":{"get":{"operationId":"getCustomerAgentRun","summary":"Inspect a customer-agent run","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"x-required-scopes":["runs:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/runs/{run_id}/result":{"get":{"operationId":"getCustomerAgentRunResult","summary":"Read a customer-agent result","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"x-required-scopes":["runs:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/runs/{run_id}/events":{"get":{"operationId":"listCustomerAgentRunEvents","summary":"Read customer-agent events","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"x-required-scopes":["runs:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"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"}],"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/runs/{run_id}/stream":{"get":{"operationId":"streamCustomerAgentRun","summary":"Stream customer-agent progress","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:read"]}],"x-required-scopes":["runs:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"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."}}],"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/runs/{run_id}/cancel":{"post":{"operationId":"cancelCustomerAgentRun","summary":"Cancel a customer-agent run","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["runs:write"]}],"x-required-scopes":["runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"$ref":"#/components/parameters/Idempotency"}],"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}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/files":{"get":{"operationId":"listCustomerAgentFiles","summary":"List persisted customer-agent files","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"name":"path","in":"query","schema":{"type":"string","default":""}},{"in":"query","name":"query","schema":{"type":"string","maxLength":4096},"description":"Case-insensitive literal substring of the relative file path."},{"name":"recursive","in":"query","description":"List all matching files by default. Set false to return only direct children of path, including directories derived from persisted files.","schema":{"type":"boolean","default":true}},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileListing"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/file":{"get":{"operationId":"readCustomerAgentFile","summary":"Read a persisted customer-agent file","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["files:read"]}],"x-required-scopes":["files:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"name":"download","in":"query","required":false,"schema":{"type":"boolean"},"description":"Redirect to a short-lived streaming download, including files larger than 4 MiB."},{"$ref":"#/components/parameters/FilePath"}],"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"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/connections":{"get":{"operationId":"listCustomerAgentConnections","summary":"List this agent’s connected accounts","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:read"]}],"x-required-scopes":["connections:read"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"name":"cursor","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnectionPage"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createCustomerAgentConnection","summary":"Prepare a customer-owned connector","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write","connections:read","runs:write"]}],"x-required-scopes":["connections:write","connections:read","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_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."},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"201":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnectionCreate"}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/connections/{connection_id}":{"delete":{"operationId":"deleteCustomerAgentConnection","summary":"Revoke this customer’s connection","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write","runs:write"]}],"x-required-scopes":["connections:write","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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":"Successful integration-path operation"},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/connections/{connection_id}/permissions":{"patch":{"operationId":"updateCustomerAgentConnectionPermissions","summary":"Change the selected permission presets","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write","connections:read","runs:write"]}],"x-required-scopes":["connections:write","connections:read","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnectionPermissions"}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/connections/{connection_id}/authorize":{"post":{"operationId":"authorizeCustomerAgentConnection","summary":"Create an embedded account setup link","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write","connections:read","runs:write"]}],"x-required-scopes":["connections:write","connections:read","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConnectionAuthorization"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConnectionAuthorize"}}}}}},"/v1/integration-paths/customer-agents/{customer_id}/{customer_agent_id}/connections/{connection_id}/complete":{"post":{"operationId":"completeCustomerAgentConnection","summary":"Confirm the returning customer and activate the account","tags":["customerAgents"],"description":"Optional Customer agents integration path: composes core primitives. Your authenticated server supplies customer identity; this is not an end-customer login API. Core APIs remain available independently.","x-platform-layer":"integration-path","security":[{"ApiKeyAuth":[]},{"DashboardSession":[]},{"CustomerOAuth":["connections:write","connections:read","runs:write"]}],"x-required-scopes":["connections:write","connections:read","runs:write"],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Stable opaque subject from your application’s authenticated backend. Never trust a browser-supplied customer ID."},{"name":"customer_agent_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"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."},{"$ref":"#/components/parameters/Idempotency"}],"responses":{"200":{"description":"Successful integration-path operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAgentConnection"}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerConnectionComplete"}}}}}}},"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.","properties":{"workspace_id":{"type":"string","format":"uuid"},"revision":{"type":"string"},"checkpoint_id":{"type":"string","format":"uuid"},"path":{"type":"string","description":"Created, saved, renamed, or removed path for a file mutation."},"previous_path":{"type":"string","description":"Original path for a file rename."},"entry":{"$ref":"#/components/schemas/FileEntry","description":"Authoritative resulting file or directory entry, absent for deletion."},"project_id":{"type":"string","format":"uuid"},"transfer_id":{"type":"string","format":"uuid"},"delivery_id":{"type":"string","format":"uuid"},"local_receipt_complete":{"type":"boolean"},"format":{"type":"string","enum":["git_bundle","portable_archive"]},"download_url":{"type":"string","format":"uri"},"manifest_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_sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"export_commit":{"type":"string"},"source_commit":{"type":"string"},"sync":{"$ref":"#/components/schemas/GitSync"}}},"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},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"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"},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"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"},"permissions":{"$ref":"#/components/schemas/AgentPermissions"},"connections":{"$ref":"#/components/schemas/ContextualConnectionPage"}},"required":["id","organization_id","name","persistence","created_at"],"additionalProperties":false},"WorkspaceCreate":{"type":"object","properties":{"name":{"type":"string","maxLength":151,"description":"Optional. Leave empty for smart naming."},"checkpoint_id":{"type":"string","format":"uuid"},"branch":{"type":"string","maxLength":151,"description":"Optional. Leave empty for smart naming."},"source":{"$ref":"#/components/schemas/WorkspaceSource"},"branch_mode":{"type":"string","enum":["auto","new","existing"],"description":"Auto uses a named existing branch or creates a new branch; new rejects an existing branch; existing requires a saved branch."},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"additionalProperties":false,"not":{"required":["source","checkpoint_id"]},"description":"Create an independent worktree addressed by ID. Name alone creates its derived branch; branch alone supplies the name. Both omitted defers name and branch until the first accepted agent run. Names are unique in the project. Source selects saved starting files and 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","null"]},"branch":{"type":["string","null"]},"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},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"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","hermes","deepseek","pi"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Saved tool selection, not authority. Omit to inherit eligible approved tools; [] selects none."},"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","hermes","deepseek","pi"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":["array","null"],"items":{"$ref":"#/components/schemas/Grant"},"description":"Omit to preserve, null to inherit current connection access, [] to select none, or select exact connection/tools."},"limits":{"$ref":"#/components/schemas/Limits"}},"required":[],"additionalProperties":false},"Agent":{"type":"object","properties":{"name":{"type":"string"},"harness":{"type":"string","enum":["codex","claude-code","opencode","hermes","deepseek","pi"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Saved tool selection, not authority. Omit to inherit eligible approved tools; [] selects none."},"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"},"connections":{"$ref":"#/components/schemas/ContextualConnectionPage"}},"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","hermes","deepseek","pi"]},"model":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Saved tool selection, not authority. Omit to inherit eligible approved tools; [] selects none."},"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","hermes","deepseek","pi"]},"model":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Saved tool selection, not authority. Omit to inherit eligible approved tools; [] selects none."},"limits":{"$ref":"#/components/schemas/Limits"},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_version":{"type":["integer","null"],"minimum":1}},"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","hermes","deepseek","pi"]},"model":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Exact tool selection for this run; omitted inherits the session/preset default, [] selects none. Selection does not grant access."},"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."},"permissions":{"$ref":"#/components/schemas/AgentPermissions"},"connection_access_overrides":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Owner-authorized access exception for this run only; requires connections:write and runs:write. Does not expand approved tools or saved defaults."}},"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."},"permissions":{"$ref":"#/components/schemas/AgentPermissions"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Exact tool selection for this run; omitted inherits the session/preset default, [] selects none. Selection does not grant access."},"connection_access_overrides":{"type":"array","items":{"$ref":"#/components/schemas/Grant"},"description":"Owner-authorized access exception for this run only; requires connections:write and runs:write. Does not expand approved tools or saved defaults."}},"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","slack","webhook","scheduled"]},"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."},"permission_layers":{"type":"array","items":{"$ref":"#/components/schemas/AgentPermissions"}},"agent_id":{"type":["string","null"],"format":"uuid"},"agent_version":{"type":["integer","null"],"minimum":1}},"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","minLength":1,"maxLength":120,"description":"Editable display name. Does not change the stable connection ID or any agent selection."},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","composio","search","claude_subscription"]},"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","claude_code"]},"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"}},"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."},"api_fallback":{"$ref":"#/components/schemas/ClaudeApiFallback"}},"required":["name","kind","auth_method"],"additionalProperties":false},"ConnectionPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Editable display name. Does not change the stable connection ID or any agent selection."},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","composio","search","claude_subscription"]},"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","claude_code"]},"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"}},"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."},"api_fallback":{"$ref":"#/components/schemas/ClaudeApiFallback"}},"required":[],"additionalProperties":false},"Connection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Editable display name. Does not change the stable connection ID or any agent selection."},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","github","composio","search","claude_subscription"]},"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"},"account_identity":{"type":["string","null"],"description":"Verified provider account identifier. Null until authorization completes; never contains OAuth tokens or provider credential state."},"api_fallback":{"$ref":"#/components/schemas/ClaudeApiFallback"},"availability":{"type":"string","enum":["pending_approval"],"description":"Present on gated Claude subscription connections. No subscription login or execution is currently enabled."}},"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"],"additionalProperties":false},"Harness":{"type":"object","properties":{"id":{"type":"string","enum":["codex","claude-code","opencode","hermes","deepseek","pi"]},"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"},"name":{"type":"string","description":"Display name of the reviewed model."},"input_micro_usd_per_million":{"type":"string","pattern":"^[0-9]+$","description":"Current retail micro-USD per million input tokens. Each accepted run retains its own rate snapshot."},"output_micro_usd_per_million":{"type":"string","pattern":"^[0-9]+$","description":"Current retail micro-USD per million output tokens, including reported reasoning tokens."}},"required":["id","provider","harnesses","enabled","billing_modes","rate_card_version","name","input_micro_usd_per_million","output_micro_usd_per_million"],"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"]},"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":151},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"required":[],"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"}}},"TriggerCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["slack","webhook","schedule"]},"prompt":{"type":"string","minLength":1,"maxLength":20000},"enabled":{"type":"boolean"},"max_runs_per_day":{"type":"integer","minimum":1,"maximum":1000},"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":100},"slack_connection_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","pattern":"^[CG][A-Z0-9]+$","maxLength":40}},"required":["name","project_id","agent_id","kind","prompt"],"additionalProperties":false,"description":"An incoming Slack/webhook trigger or durable scheduled task. A saved agent preset supplies harness, model, grants and billing. Cron requires five fields and an IANA timezone (UTC by default); Slack requires a connection and channel ID."},"TriggerPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"prompt":{"type":"string","minLength":1,"maxLength":20000},"enabled":{"type":"boolean"},"max_runs_per_day":{"type":"integer","minimum":1,"maximum":1000},"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":100},"slack_connection_id":{"type":"string","format":"uuid"},"channel_id":{"type":"string","pattern":"^[CG][A-Z0-9]+$","maxLength":40}},"required":[],"additionalProperties":false,"minProperties":1},"Trigger":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["slack","webhook","schedule"]},"prompt":{"type":"string","minLength":1,"maxLength":20000},"enabled":{"type":"boolean"},"max_runs_per_day":{"type":"integer","minimum":1,"maximum":1000},"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":100},"slack_connection_id":{"type":["string","null"],"format":"uuid"},"channel_id":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"next_fire_at":{"type":["string","null"],"format":"date-time"},"last_error_code":{"type":["string","null"]},"last_fired_at":{"type":["string","null"],"format":"date-time"},"webhook_url":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","name","project_id","agent_id","kind","prompt","enabled","max_runs_per_day","next_fire_at","last_error_code","last_fired_at","webhook_url","created_at","updated_at","slack_connection_id","channel_id"],"additionalProperties":false},"NewTrigger":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["slack","webhook","schedule"]},"prompt":{"type":"string","minLength":1,"maxLength":20000},"enabled":{"type":"boolean"},"max_runs_per_day":{"type":"integer","minimum":1,"maximum":1000},"cron":{"type":"string","minLength":1,"maxLength":120},"timezone":{"type":"string","minLength":1,"maxLength":100},"slack_connection_id":{"type":["string","null"],"format":"uuid"},"channel_id":{"type":["string","null"]},"id":{"type":"string","format":"uuid"},"next_fire_at":{"type":["string","null"],"format":"date-time"},"last_error_code":{"type":["string","null"]},"last_fired_at":{"type":["string","null"],"format":"date-time"},"webhook_url":{"type":["string","null"],"format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"webhook_secret":{"type":"string","description":"Returned once for a new webhook trigger. Send as Authorization: Bearer; never put it in the URL."}},"required":["id","name","project_id","agent_id","kind","prompt","enabled","max_runs_per_day","next_fire_at","last_error_code","last_fired_at","webhook_url","created_at","updated_at","slack_connection_id","channel_id"],"additionalProperties":false},"TriggerSecret":{"type":"object","properties":{"webhook_secret":{"type":"string"}},"required":["webhook_secret"],"additionalProperties":false},"TriggerDelivery":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trigger_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","accepted","failed","skipped"]},"run_id":{"type":["string","null"],"format":"uuid"},"error_code":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"reply_state":{"type":"string","enum":["none","pending","sending","sent","failed","uncertain"]}},"required":["id","trigger_id","status","run_id","error_code","received_at","expires_at","reply_state"],"additionalProperties":false},"SlackConnectionCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"bot_token":{"type":"string","minLength":10,"maxLength":1000,"writeOnly":true},"signing_secret":{"type":"string","minLength":16,"maxLength":200,"writeOnly":true}},"required":["name","bot_token","signing_secret"],"additionalProperties":false},"SlackConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"team_id":{"type":"string"},"bot_user_id":{"type":"string"},"events_url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"}},"required":["id","name","team_id","bot_user_id","events_url","created_at"],"additionalProperties":false},"SlackChannel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"ClaudeApiFallback":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid","description":"Your Anthropic API-key connection. No implicit managed-key fallback."},"max_cost_micro_usd":{"type":"string","pattern":"^[0-9]{1,12}$","description":"Positive per-run API spending ceiling, including in-flight request reservations. Infrastructure is charged separately."},"enabled":{"type":"boolean","description":"False disables fallback and clears the saved backup selection. True requires an owned connection_id and a positive max_cost_micro_usd."}},"required":["enabled"],"additionalProperties":false,"description":"Optional per-run policy for confirmed subscription quota exhaustion before native execution starts. Disabled by default. Subscription execution is currently gated."},"FolderCreate":{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":4096,"description":"Relative workspace path without traversal, empty segments, or reserved platform paths."}},"required":["path"],"additionalProperties":false},"FileRename":{"type":"object","properties":{"new_path":{"type":"string","minLength":1,"maxLength":4096,"description":"Relative workspace path without traversal, empty segments, or reserved platform paths."}},"required":["new_path"],"additionalProperties":false},"WorktreeOptions":{"type":"object","additionalProperties":false,"required":["branches","valid"],"properties":{"branches":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","ref","workspace_id"],"properties":{"name":{"type":"string"},"ref":{"type":"string"},"workspace_id":{"type":"string","format":"uuid"}}}},"valid":{"type":"boolean"},"name":{"type":["string","null"]},"branch":{"type":["string","null"]},"branch_exists":{"type":"boolean"},"message":{"type":"string"}}},"FileDuplicate":{"type":"object","additionalProperties":false,"required":["path","new_path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":4096},"new_path":{"type":"string","minLength":1,"maxLength":4096}}},"PermissionPatterns":{"type":"object","additionalProperties":false,"description":"Case-sensitive worktree-relative glob rules (*, **, ?). Omitted include inherits all; an empty include allows none. Exclusions always win.","properties":{"include":{"type":"array","maxItems":64,"items":{"type":"string","minLength":1,"maxLength":256}},"exclude":{"type":"array","maxItems":64,"items":{"type":"string","minLength":1,"maxLength":256}}}},"AgentPermissions":{"type":"object","additionalProperties":false,"required":["version"],"description":"Agent authority, separate from human/API scopes. Project, worktree and run restrictions intersect. File restrictions disable shell and local stdio connectors. Policies are frozen for a session; start a new session after changing them. Unsupported harness policies fail before reservation.","properties":{"version":{"type":"integer","enum":[1]},"files":{"type":"object","additionalProperties":false,"properties":{"read":{"$ref":"#/components/schemas/PermissionPatterns"},"write":{"$ref":"#/components/schemas/PermissionPatterns"}}},"shell":{"type":"string","enum":["allow","deny"]},"tools":{"$ref":"#/components/schemas/PermissionPatterns"}}},"ConnectionAccess":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^[1-9][0-9]*$"},"organization_wide":{"type":"boolean"},"tools":{"type":"array","items":{"type":"string"},"uniqueItems":true},"rule_count":{"type":"integer","minimum":0},"can_grant":{"type":"boolean"},"can_revoke":{"type":"boolean"}},"required":["connection_id","version","organization_wide","tools","rule_count","can_grant","can_revoke"],"additionalProperties":false},"ConnectionAccessPatch":{"type":"object","properties":{"organization_wide":{"type":"boolean"},"tools":{"type":"array","items":{"type":"string"},"uniqueItems":true}},"required":[],"additionalProperties":false,"minProperties":1},"ConnectionAccessRuleInput":{"oneOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["project"]},"project_id":{"type":"string","format":"uuid"}},"required":["scope","project_id"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["agent"]},"agent_id":{"type":"string","format":"uuid"}},"required":["scope","agent_id"],"additionalProperties":false},{"type":"object","properties":{"scope":{"type":"string","enum":["project_agent"]},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"}},"required":["scope","project_id","agent_id"],"additionalProperties":false}]},"ConnectionAccessRule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["project","agent","project_agent"]},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"],"format":"uuid"},"project_name":{"type":["string","null"]},"agent_name":{"type":["string","null"]},"unavailable":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","connection_id","scope","project_id","agent_id","project_name","agent_name","unavailable","created_at","updated_at"],"additionalProperties":false},"ConnectionAccessRulePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionAccessRule"}},"next_cursor":{"type":["string","null"]},"version":{"type":"string","pattern":"^[1-9][0-9]*$"}},"required":["data","next_cursor","version"],"additionalProperties":false},"ConnectionAccessRuleMutation":{"type":"object","properties":{"rule":{"$ref":"#/components/schemas/ConnectionAccessRule"},"version":{"type":"string","pattern":"^[1-9][0-9]*$"}},"required":["rule","version"],"additionalProperties":false},"ConnectionAccessRuleDeleted":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^[1-9][0-9]*$"}},"required":["id","version"],"additionalProperties":false},"ConnectionAccessMatch":{"type":"object","properties":{"scopes":{"type":"array","items":{"type":"string","enum":["organization","project","agent","project_agent"]}},"conditional":{"type":"boolean"},"matched_rule_count":{"type":"integer","minimum":0},"matching_rules":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionAccessRuleMatch"},"maxItems":3},"matching_rules_truncated":{"type":"boolean"}},"required":["scopes","conditional","matched_rule_count","matching_rules","matching_rules_truncated"],"additionalProperties":false},"ContextualConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":120,"description":"Editable display name. Does not change the stable connection ID or any agent selection."},"kind":{"type":"string","enum":["model","mcp_remote","mcp_stdio","github","composio","search","claude_subscription"]},"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"},"account_identity":{"type":["string","null"],"description":"Verified provider account identifier. Null until authorization completes; never contains OAuth tokens or provider credential state."},"api_fallback":{"$ref":"#/components/schemas/ClaudeApiFallback"},"availability":{"type":"string","enum":["pending_approval"],"description":"Present on gated Claude subscription connections. No subscription login or execution is currently enabled."},"access_match":{"$ref":"#/components/schemas/ConnectionAccessMatch"},"approved_tools":{"type":"array","items":{"type":"string"},"description":"Approved tool names only; this selection ceiling does not authorize execution."}},"required":["id","name","kind","auth_method","status","created_at"],"additionalProperties":false},"ContextualConnectionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ContextualConnection"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"ConnectionAccessResolution":{"type":"object","properties":{"connection_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tools":{"type":"array","items":{"type":"string"},"uniqueItems":true},"source":{"type":"string","enum":["organization","project","agent","project_agent","run_override","none"]},"ready":{"type":"boolean"},"rejection_codes":{"type":"array","items":{"type":"string"}},"access_match":{"$ref":"#/components/schemas/ConnectionAccessMatch"},"can_override":{"type":"boolean"}},"required":["connection_id","name","tools","source","ready","rejection_codes","access_match","can_override"],"additionalProperties":false},"ConnectionAccessResolutionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionAccessResolution"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"ConnectionAccessResolve":{"type":"object","properties":{"project_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"connection_grants":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"connection_access_overrides":{"type":"array","items":{"$ref":"#/components/schemas/Grant"}},"permissions":{"$ref":"#/components/schemas/AgentPermissions"}},"required":[],"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"]}]}}]},"ConnectionAccessRuleMatch":{"type":"object","description":"An authorized, bounded rule sample for explaining contextual access. Never use a sample as an authorization decision.","properties":{"rule_id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["project","agent","project_agent"]},"project_id":{"type":["string","null"],"format":"uuid"},"agent_id":{"type":["string","null"],"format":"uuid"},"project_name":{"type":["string","null"]},"agent_name":{"type":["string","null"]}},"required":["rule_id","scope"],"additionalProperties":false},"CustomerAgentConfiguration":{"type":"object","properties":{"harness":{"type":"string","enum":["codex","claude-code","opencode","hermes","deepseek","pi"]},"model":{"type":"string"},"instructions":{"type":"string"},"billing_mode":{"type":"string","enum":["byok","managed","subscription"]},"provider_connection_id":{"type":"string","format":"uuid","description":"Exact owned model API-key or Claude subscription connection. A new connection never changes existing presets or sessions. Subscription runs remain gated."},"limits":{"$ref":"#/components/schemas/Limits"}},"required":["harness","model","billing_mode","limits"],"additionalProperties":false},"CustomerAgentEnsure":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100},"name":{"type":"string","minLength":1,"maxLength":120},"configuration":{"$ref":"#/components/schemas/CustomerAgentConfiguration"}},"required":["key","name","configuration"],"additionalProperties":false,"description":"Integration path only. Creates one project, default worktree and private preset atomically, or returns the existing binding for this customer/key. Configuration is used only on first creation; use core APIs for explicit configuration changes. No run or paid call starts."},"CustomerAgentBinding":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"integration_path":{"type":"string","enum":["customer-agents"]},"customer_id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"project_id":{"type":"string","format":"uuid"},"agent_id":{"type":"string","format":"uuid"},"workspace_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"}},"required":["id","integration_path","customer_id","key","name","project_id","agent_id","workspace_id","created_at"],"additionalProperties":false,"description":"Optional use-case binding over core resources, not another execution primitive. The authenticated application server asserts its verified customer subject."},"CustomerAgentPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAgentBinding"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"CustomerAgentMessage":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":100000},"conversation_id":{"type":"string","format":"uuid"},"limits":{"$ref":"#/components/schemas/Limits"},"queue_if_busy":{"type":"boolean","description":"Queue when this worktree is busy. Omitted means false."}},"required":["prompt"],"additionalProperties":false,"description":"Omit conversation_id for a new native conversation over the same files. An existing conversation must belong to this binding. Only explicitly selected customer connections are used; no organization-wide inheritance."},"ConnectionCapability":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"label":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":500},"tools":{"type":"array","minItems":1,"maxItems":64,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":200}}},"required":["id","label","tools"],"additionalProperties":false,"description":"An application-reviewed permission preset. Exact tool names are validated against the enabled provider catalog; labels are not inferred from tool names and do not replace provider OAuth scopes."},"CustomerAgentConnectionCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"provider":{"type":"string","minLength":1,"maxLength":100},"capabilities":{"type":"array","minItems":1,"maxItems":12,"items":{"$ref":"#/components/schemas/ConnectionCapability"}}},"required":["name","provider","capabilities"],"additionalProperties":false,"description":"Prepare an embedded app connection with no access. Configure an enabled connector and reviewed capability presets on the trusted backend. The customer selects a preset during consent; no Macrofold login is required."},"CustomerAgentConnection":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/Connection"},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionCapability"}},"selected_capabilities":{"type":"array","items":{"type":"string"}},"access_version":{"type":"string"},"approved_tools":{"type":"array","items":{"type":"string"}}},"required":["connection","capabilities","selected_capabilities","access_version","approved_tools"],"additionalProperties":false,"description":"Customer-scoped connection and permission choices. Core tool ceilings/rules remain authoritative."},"CustomerAgentConnectionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerAgentConnection"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false},"CustomerAgentConnectionPermissions":{"type":"object","properties":{"capability_ids":{"type":"array","maxItems":12,"uniqueItems":true,"items":{"type":"string"}}},"required":["capability_ids"],"additionalProperties":false,"description":"Select within the reviewed capability ceiling, or [] to remove tool access. Requires the current quoted access version in If-Match."},"CustomerConnectionAuthorize":{"type":"object","properties":{"return_url":{"type":"string","format":"uri","maxLength":2048}},"required":["return_url"],"additionalProperties":false,"description":"An authenticated callback in YOUR application. After provider consent, authenticate the returning customer again and complete authorization server-side. Never reflect an untrusted browser-supplied return URL."},"CustomerConnectionAuthorization":{"type":"object","properties":{"authorization_id":{"type":"string","format":"uuid"},"authorization_url":{"type":"string","format":"uri"},"expires_at":{"type":"string","format":"date-time"}},"required":["authorization_id","authorization_url","expires_at"],"additionalProperties":false,"description":"Short-lived setup link, not a platform API credential. Open it in a popup or top-level window; its fragment must not be logged. Expired or uncertain attempts require a newly requested link."},"CustomerConnectionComplete":{"type":"object","properties":{"code":{"type":"string","minLength":20,"maxLength":4096}},"required":["code"],"additionalProperties":false,"description":"Single-use callback code. Only send after authenticating the returning user in your app and deriving customer_id from that verified session. Browser-supplied identity is not authority."}},"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)","triggers:read":"Read authorized incoming triggers, schedules and deliveries","triggers:write":"Manage incoming triggers and scheduled tasks"}}}}}},"x-design-status":"implemented-local-validation","tags":[{"name":"customerAgents","description":"Integration path · Customer agents. Optional use-case-specific composition of core projects, presets, worktrees, sessions, runs and connections. Customer identity is asserted by your authenticated backend; core platform primitives do not depend on this path."}]}