{"openapi":"3.2.0","info":{"title":"Inspect API","version":"1.0.0","description":"API for programmatically creating and managing Inspect sessions.\n\n## Authentication\n\nMost API requests require authentication using an API key. Include your API key in the `Authorization` header as a Bearer token:\n\n```\nAuthorization: Bearer riu_xxxxxxxxxxxxx\n```\n\n## Getting an API Key\n\n### User keys (`riu_` prefix)\n\nUser keys let you use the API as yourself. Sessions created with your key will open PRs under your GitHub account.\n\nTo generate a user API key:\n1. Go to [Settings](https://inspect.com/my/settings)\n2. Scroll to the **Developer** section\n3. Click **Generate API key**\n4. Copy and save the key - it will only be shown once\n\n### System keys (`ris_` prefix)\n\nSystem keys are for automated integrations that need to open PRs as Inspect itself (not as a specific user).\nTo request a system key, ask your Inspect administrators so they can assess the request. Include:\n\n1. The system key name.\n2. Whether the key needs read-only or write access.\n3. The repository scope the key needs.\n4. What the integration will do with the key.\n5. The expected request/session volume.\n\n## Request validation\n\nRequest bodies are validated strictly. A body containing a field that the endpoint does not define, including inside a nested object, is rejected with a `400` response whose message names the field, for example `Unrecognized key: \"promt\"`. Map fields such as `variables` accept any keys, and free-form JSON fields such as `output_schema` accept any content. Unknown query parameters are ignored.\n"},"tags":[{"name":"Operate"},{"name":"Projects","description":"Manage projects and the sessions in them"},{"name":"Artifacts","description":"Manage artifacts"},{"name":"Automations","description":"Manage automations"},{"name":"Skills","description":"Manage reusable skills"},{"name":"Agents","description":"Manage custom agents"},{"name":"Memories","description":"Read and write personal memories"},{"name":"User","description":"Read the API key user's preferences"},{"name":"Previews","description":"Report pull request preview deployments"},{"name":"Deployments","description":"Report repository deployments"},{"name":"Repositories","description":"List and manage repositories"},{"name":"Models","description":"List available models"},{"name":"Sessions","description":"Create and manage Inspect sessions"}],"paths":{"/api/v2/agents":{"get":{"operationId":"listAgents","summary":"List agents","description":"List available agents. Returns all non-deleted agents with their basic metadata (no `prompt` or `skills` here; use `GET /api/v2/agents/{agent_id}` for full configuration). Use the returned `id` in the `agent_id` field when creating a session.","parameters":[],"responses":{"200":{"description":"List of custom agents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.AgentList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["Agents"],"x-api-key-scope":"agents:read","security":[{"bearerAuth":["agents:read"]}]},"post":{"operationId":"createAgent","summary":"Create agent","description":"Create a custom agent owned by the user associated with the API key. Slack app, avatar, and contributor settings are not managed by this endpoint.","parameters":[],"responses":{"201":{"description":"Custom agent created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/UnknownRepositoryError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}},"tags":["Agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.CreateAgentRequest"}}}},"x-api-key-scope":"agents:write","security":[{"bearerAuth":["agents:write"]}]}},"/api/v2/agents/{agent_id}":{"get":{"operationId":"getAgent","summary":"Get agent","description":"Retrieve a single agent by ID, including system `prompt`, `skills`, capabilities, and repository configuration. The list endpoint (`GET /api/v2/agents`) returns summary metadata only; use this route for full configuration. Same API key authentication as other public v1 endpoints.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID (from the list agents response)","schema":{"$ref":"#/components/schemas/Agents.AgentId"}}],"responses":{"200":{"description":"Agent details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNotFoundError"}}}}},"tags":["Agents"],"x-api-key-scope":"agents:read","security":[{"bearerAuth":["agents:read"]}]},"patch":{"operationId":"updateAgent","summary":"Update agent","description":"Partially update a custom agent. The API key user must be the creator, a contributor, or an Inspect admin. Only provided fields are changed.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID","schema":{"$ref":"#/components/schemas/Agents.AgentId"}}],"responses":{"200":{"description":"Custom agent updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Agents.AgentDetail"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/UnknownRepositoryError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/AgentForbiddenError"}]}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}},"tags":["Agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.UpdateAgentRequest"}}}},"x-api-key-scope":"agents:write","security":[{"bearerAuth":["agents:write"]}]},"delete":{"operationId":"archiveAgent","summary":"Archive agent","description":"Archive (soft-delete) a custom agent. Archived agents are omitted from list and get responses and cannot start new sessions. The agent's Slack user group is disabled and its avatar is deleted. The API key user must be the creator, a contributor, or an Inspect admin. Archived agents cannot be restored through the API.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID","schema":{"$ref":"#/components/schemas/Agents.AgentId"}}],"responses":{"204":{"description":"Custom agent archived"},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/AgentForbiddenError"}]}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNotFoundError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}},"tags":["Agents"],"x-api-key-scope":"agents:write","security":[{"bearerAuth":["agents:write"]}]}},"/api/v2/agents/{agent_id}/versions":{"get":{"operationId":"listAgentVersions","summary":"List agent versions","description":"List every saved prompt version for an agent, newest first. Only the prompt is versioned; the rest of the agent's configuration is always current. The API key user must be the creator, a contributor, or an Inspect admin.","parameters":[{"name":"agent_id","in":"path","required":true,"description":"Agent ID","schema":{"$ref":"#/components/schemas/Agents.AgentId"}}],"responses":{"200":{"description":"Agent prompt versions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agents.AgentVersionList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"You do not have permission to change this agent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentForbiddenError"}}}},"404":{"description":"Agent not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentNotFoundError"}}}}},"tags":["Agents"],"x-api-key-scope":"agents:read","security":[{"bearerAuth":["agents:read"]}]}},"/api/v2/artifacts":{"get":{"operationId":"listArtifacts","summary":"List artifacts","description":"List or search published artifacts, newest first. Supports cursor pagination.","parameters":[{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.first"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.after"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.query"},{"$ref":"#/components/parameters/Artifacts.ListArtifactsQuery.type"}],"responses":{"200":{"description":"List results for artifacts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.ArtifactList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidCursorError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStorageUnavailableError"}}}}},"tags":["Artifacts"],"x-api-key-scope":"artifacts:read","security":[{"bearerAuth":["artifacts:read"]}]},"post":{"operationId":"createArtifact","summary":"Create artifact","description":"Publish a link artifact. If an artifact with the same canonical URL already exists, returns it unchanged with status 200 and `meta.created: false`. Returns 400 when the URL has credentials or a local/private host.","parameters":[],"responses":{"200":{"description":"An artifact with the same canonical URL already existed and is returned unchanged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactResult"}}}},"201":{"description":"Artifact created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactResult"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/InvalidArtifactUrlError"},{"$ref":"#/components/schemas/ArtifactValidationFailedError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStorageUnavailableError"}}}}},"tags":["Artifacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.CreateArtifactRequest"}}}},"x-api-key-scope":"artifacts:write","security":[{"bearerAuth":["artifacts:write"]}]}},"/api/v2/artifacts/{artifact_id}":{"get":{"operationId":"getArtifact","summary":"Get artifact","description":"Retrieve a published artifact.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Artifacts.ArtifactId"}}],"responses":{"200":{"description":"Artifact details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactNotFoundError"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStorageUnavailableError"}}}}},"tags":["Artifacts"],"x-api-key-scope":"artifacts:read","security":[{"bearerAuth":["artifacts:read"]}]},"patch":{"operationId":"updateArtifact","summary":"Update artifact","description":"Partially update a published artifact. Returns 400 when `url` or `type` is set on a `file` or `session_replay` artifact or the URL has credentials or a local/private host, and 409 when another artifact already uses the URL.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Artifacts.ArtifactId"}}],"responses":{"200":{"description":"Artifact updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/InvalidArtifactUrlError"},{"$ref":"#/components/schemas/ArtifactFieldImmutableError"},{"$ref":"#/components/schemas/ArtifactValidationFailedError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactNotFoundError"}}}},"409":{"description":"Artifact URL already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactUrlConflictError"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStorageUnavailableError"}}}}},"tags":["Artifacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Artifacts.UpdateArtifactRequest"}}}},"x-api-key-scope":"artifacts:write","security":[{"bearerAuth":["artifacts:write"]}]},"delete":{"operationId":"deleteArtifact","summary":"Delete artifact","description":"Remove a published artifact. Artifacts produced in a session stay with that session, unpublished; others are deleted.","parameters":[{"name":"artifact_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Artifacts.ArtifactId"}}],"responses":{"204":{"description":"Artifact deleted"},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"404":{"description":"Artifact not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactNotFoundError"}}}},"500":{"description":"Artifact storage is temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactStorageUnavailableError"}}}}},"tags":["Artifacts"],"x-api-key-scope":"artifacts:write","security":[{"bearerAuth":["artifacts:write"]}]}},"/api/v2/automations":{"get":{"operationId":"listAutomations","summary":"List automations","description":"List automations owned by or shared with the authenticated user. Pass `scope=all` to also include published automations and their soft forks. Supports cursor pagination.","parameters":[{"name":"first","in":"query","required":false,"description":"Number of results to return (max 100).","schema":{"$ref":"#/components/schemas/Automations.AutomationPageSize","default":50},"explode":false},{"name":"after","in":"query","required":false,"description":"Cursor for pagination. Use `meta.next_cursor` from a previous response.","schema":{"type":"string"},"explode":false},{"name":"include_archived","in":"query","required":false,"description":"If true, include archived automations. Defaults to false.","schema":{"type":"boolean","default":false},"explode":false},{"name":"scope","in":"query","required":false,"description":"`mine` returns automations the authenticated user owns or collaborates on. `all` also returns every automation the user can view, including published automations and their soft forks. Defaults to `mine`.","schema":{"$ref":"#/components/schemas/Automations.AutomationListScope","default":"mine"},"explode":false}],"responses":{"200":{"description":"List of automations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.AutomationList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidCursorError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["Automations"],"x-api-key-scope":"automations:read","security":[{"bearerAuth":["automations:read"]}]},"post":{"operationId":"createAutomation","summary":"Create automation","description":"Create a new automation with zero or more independently configured triggers.","parameters":[],"responses":{"201":{"description":"Automation created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationInvalidRequestBodyError"},{"$ref":"#/components/schemas/InvalidAutomationError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/AutomationForbiddenError"}]}}}},"404":{"description":"Source automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAutomationNotFoundError"}}}},"409":{"description":"Conflicting automation, trigger, or integration state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConflictError"}}}},"503":{"description":"Trigger integration is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationIntegrationUnavailableError"}}}}},"tags":["Automations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.CreateAutomationRequest"}}}},"x-api-key-scope":"automations:write","security":[{"bearerAuth":["automations:write"]}]}},"/api/v2/automations/{automation_id}":{"get":{"operationId":"getAutomation","summary":"Get automation","description":"Retrieve a single automation by ID.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Automations.AutomationId"}}],"responses":{"200":{"description":"Automation details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationNotFoundError"}}}}},"tags":["Automations"],"x-api-key-scope":"automations:read","security":[{"bearerAuth":["automations:read"]}]},"patch":{"operationId":"updateAutomation","summary":"Update automation","description":"Partially update an automation. Only provided fields are changed.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Automations.AutomationId"}}],"responses":{"200":{"description":"Automation updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationInvalidRequestBodyError"},{"$ref":"#/components/schemas/InvalidAutomationError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/AutomationForbiddenError"}]}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationNotFoundError"}}}},"409":{"description":"Conflicting automation, trigger, or integration state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationConflictError"}}}},"503":{"description":"Trigger integration is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationIntegrationUnavailableError"}}}}},"tags":["Automations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.UpdateAutomationRequest"}}}},"x-api-key-scope":"automations:write","security":[{"bearerAuth":["automations:write"]}]},"delete":{"operationId":"archiveAutomation","summary":"Archive automation","description":"Soft-archive an automation. The automation is disabled and hidden from default list queries but can still be retrieved with include_archived=true.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Automations.AutomationId"}}],"responses":{"204":{"description":"Automation archived"},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/AutomationForbiddenError"}]}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationNotFoundError"}}}}},"tags":["Automations"],"x-api-key-scope":"automations:write","security":[{"bearerAuth":["automations:write"]}]}},"/api/v2/automations/{automation_id}/trigger":{"post":{"operationId":"triggerAutomation","summary":"Trigger automation","description":"Manually trigger an automation run.","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Automations.AutomationId"}}],"responses":{"200":{"description":"Automation triggered","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Automations.Automation"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/InvalidAutomationError"},{"$ref":"#/components/schemas/AutomationArchivedError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationNotFoundError"}}}}},"tags":["Automations"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Automations.TriggerAutomationRequest"}}}},"x-api-key-scope":"automations:write","security":[{"bearerAuth":["automations:write"]}]}},"/api/v2/memories":{"get":{"operationId":"listMemories","summary":"List memories","description":"List active memories in a personal scope. Memory reads are available to every Inspect API key holder.","parameters":[{"name":"scope","in":"query","required":true,"description":"Scope type to read.","schema":{"$ref":"#/components/schemas/Memories.MemoryScopeType"},"explode":false},{"name":"scope_id","in":"query","required":false,"description":"User id. Defaults to the API key user.","schema":{"$ref":"#/components/schemas/Memories.MemoryUserId"},"explode":false},{"name":"directive_limit","in":"query","required":false,"description":"Maximum number of directive memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryDirectiveLimit","default":20},"explode":false},{"name":"fact_limit","in":"query","required":false,"description":"Maximum number of fact memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryFactLimit","default":50},"explode":false}],"responses":{"200":{"description":"Active memories in the requested scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.MemoryList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUserNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"x-api-key-scope":"memories:read","security":[{"bearerAuth":["memories:read"]}]},"post":{"operationId":"createMemory","summary":"Create memory","description":"Create one durable memory. `personal` always targets the API key user's own scope.","parameters":[],"responses":{"201":{"description":"Created memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.CreatedMemory"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/ScopeIdNotSupportedError"},{"$ref":"#/components/schemas/MemoryDirectiveTooLongError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.CreateMemoryRequest"}}}},"x-api-key-scope":"memories:write","security":[{"bearerAuth":["memories:write"]}]}},"/api/v2/memories/context":{"get":{"operationId":"getMemoryContext","summary":"Get memory context","description":"Read the active memory context for a user. Personal memories default to the API key user; pass `user_id` to read another user's context.","parameters":[{"name":"user_id","in":"query","required":false,"description":"User whose personal memories are included. Defaults to the API key user. Ignored when `include_personal` is `false`.","schema":{"$ref":"#/components/schemas/Memories.MemoryUserId"},"explode":false},{"name":"include_personal","in":"query","required":false,"description":"Set to `false` to exclude personal memories from the context.","schema":{"type":"boolean","default":true},"explode":false},{"name":"directive_limit","in":"query","required":false,"description":"Maximum number of directive memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryDirectiveLimit","default":20},"explode":false},{"name":"fact_limit","in":"query","required":false,"description":"Maximum number of fact memories to return.","schema":{"$ref":"#/components/schemas/Memories.MemoryFactLimit","default":50},"explode":false}],"responses":{"200":{"description":"Active memory context for the requested scopes","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryContext"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryUserNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"x-api-key-scope":"memories:read","security":[{"bearerAuth":["memories:read"]}]}},"/api/v2/memories/{memory_id}":{"get":{"operationId":"getMemory","summary":"Get memory","description":"Read one memory by id, including its canonical body, lifecycle state, and every scope it is placed in. Archived memories are returned.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Memories.MemoryId"}}],"responses":{"200":{"description":"Memory details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryDetails"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"x-api-key-scope":"memories:read","security":[{"bearerAuth":["memories:read"]}]},"patch":{"operationId":"updateMemory","summary":"Update memory","description":"Replace the title, canonical body, discovery summary, and type of an active memory.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Memories.MemoryId"}}],"responses":{"200":{"description":"Updated memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryResult"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MemoryDirectiveTooLongError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryNotFoundError"}}}},"409":{"description":"Memory is archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryArchivedError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.UpdateMemoryRequest"}}}},"x-api-key-scope":"memories:write","security":[{"bearerAuth":["memories:write"]}]}},"/api/v2/memories/{memory_id}/archive":{"post":{"operationId":"archiveMemory","summary":"Archive memory","description":"Archive a stale, superseded, or no-longer-relevant memory.","parameters":[{"name":"memory_id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Memories.MemoryId"}}],"responses":{"200":{"description":"Archived memory","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Memories.MemoryResult"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MemoryValidationFailedError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadOnlyApiKeyError"}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryNotFoundError"}}}},"409":{"description":"Memory is archived","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryArchivedError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Memories"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories.ArchiveMemoryRequest"}}}},"x-api-key-scope":"memories:write","security":[{"bearerAuth":["memories:write"]}]}},"/api/v2/models":{"get":{"operationId":"listModels","summary":"List models","description":"List available models.","parameters":[],"responses":{"200":{"description":"List of models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Models.ModelList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["Models"],"x-api-key-scope":"models:read","security":[{"bearerAuth":["models:read"]}]}},"/api/v2/repositories":{"get":{"operationId":"listRepositories","summary":"List repositories","description":"List available repositories. System API keys see every repository available to them; user keys see their visible, non-hidden repositories.","parameters":[],"responses":{"200":{"description":"List of repositories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories.RepositoryList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["Repositories"],"x-api-key-scope":"repositories:read","security":[{"bearerAuth":["repositories:read"]}]},"post":{"operationId":"createRepository","summary":"Create repository","description":"Create a repository in Inspect from a GitHub repository URL. Requires repository add permission; API keys restricted to specific repositories cannot create repositories. Returns 404 when the Inspect GitHub App cannot access the repository.","parameters":[],"responses":{"201":{"description":"Created repository","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Repositories.Repository"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidRepositoryError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryManagementForbiddenError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}},"409":{"description":"Repository is already configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAlreadyExistsError"}}}}},"tags":["Repositories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories.CreateRepositoryRequest"}}}},"x-api-key-scope":"repositories:write","security":[{"bearerAuth":["repositories:write"]}]}},"/api/v2/repositories/{owner}/{repo}/deployments":{"post":{"operationId":"reportDeployment","summary":"Report deployment","description":"Report deployment status for one or more pull requests. Accepts normal personal or system API keys with write access and access to the repository. Only deployed and failed statuses are accepted. Each new event is notified independently, without a cross-environment completion gate. Send requests to your own Inspect origin. Idempotency keys are scoped per repository/PR, independent of the API key: retries with the same key do not record or notify again. Reuse a key only for the same event.","parameters":[{"name":"owner","in":"path","required":true,"description":"GitHub repository owner.","schema":{"$ref":"#/components/schemas/Deployments.RepositoryOwnerPathSegment"}},{"name":"repo","in":"path","required":true,"description":"GitHub repository name.","schema":{"$ref":"#/components/schemas/Deployments.RepositoryNamePathSegment"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable event ID, deduplicated per repository/PR across retries and credential rotation.","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The event was recorded, or was already recorded with the same idempotency key. Slack delivery is asynchronous and best effort.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Deployments.DeploymentReport"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidIdempotencyKeyError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Deployments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployments.ReportDeploymentRequest"}}}},"x-api-key-scope":"deployments:write","security":[{"bearerAuth":["deployments:write"]}]}},"/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/deployments":{"get":{"operationId":"listPullRequestDeployments","summary":"List pull request deployments","description":"List the latest status of every environment the pull request has been deployed to.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"}],"responses":{"200":{"description":"Deployments for the pull request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployments.PullRequestDeploymentList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Deployments"],"x-api-key-scope":"deployments:read","security":[{"bearerAuth":["deployments:read"]}]}},"/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/previews":{"get":{"operationId":"listPullRequestPreviews","summary":"List pull request previews","description":"List the latest state of every preview reported for a pull request, as stored on the Inspect sessions currently linked to it.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"}],"responses":{"200":{"description":"Previews for the pull request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Previews.PullRequestPreviewList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Previews"],"x-api-key-scope":"previews:read","security":[{"bearerAuth":["previews:read"]}]}},"/api/v2/repositories/{owner}/{repo}/pulls/{pull_request_number}/previews/{name}":{"put":{"operationId":"upsertPullRequestPreview","summary":"Report pull request preview","description":"Record the deploy status of a named preview for a pull request, typically from CI. The status is applied to every Inspect session currently linked to the pull request; sessions linked later receive the next reported status. Retries are safe: an update whose `occurred_at` is older than the stored status for the same preview is ignored. A `deploying` or `failed` status keeps the last successful URL.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"},{"$ref":"#/components/parameters/Previews.PreviewParams.name"}],"responses":{"200":{"description":"The status was accepted","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Previews.UpsertedPullRequestPreview"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Previews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Previews.UpsertPullRequestPreviewRequest"}}}},"x-api-key-scope":"previews:write","security":[{"bearerAuth":["previews:write"]}]},"delete":{"operationId":"deletePullRequestPreview","summary":"Delete pull request preview","description":"Remove a named preview from every Inspect session linked to the pull request, for example after the preview environment is torn down.","parameters":[{"$ref":"#/components/parameters/Previews.PullRequestParams.owner"},{"$ref":"#/components/parameters/Previews.PullRequestParams.repo"},{"$ref":"#/components/parameters/Previews.PullRequestParams.pull_request_number"},{"$ref":"#/components/parameters/Previews.PreviewParams.name"}],"responses":{"204":{"description":"The preview was removed (or did not exist)"},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Previews"],"x-api-key-scope":"previews:write","security":[{"bearerAuth":["previews:write"]}]}},"/api/v2/repositories/{repository_id}":{"get":{"operationId":"getRepository","summary":"Get repository","description":"Retrieve a repository and its settings.","parameters":[{"name":"repository_id","in":"path","required":true,"description":"Repository identifier","schema":{"$ref":"#/components/schemas/Repositories.RepositoryId"}}],"responses":{"200":{"description":"Repository details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Repositories.Repository"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Repositories"],"x-api-key-scope":"repositories:read","security":[{"bearerAuth":["repositories:read"]}]},"patch":{"operationId":"updateRepository","summary":"Update repository","description":"Update a GitHub repository's settings. Requires repository management permission.","parameters":[{"name":"repository_id","in":"path","required":true,"description":"Repository identifier","schema":{"$ref":"#/components/schemas/Repositories.RepositoryId"}}],"responses":{"200":{"description":"Updated repository","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Repositories.Repository"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidRepositoryError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryManagementForbiddenError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Repositories"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Repositories.UpdateRepositoryRequest"}}}},"x-api-key-scope":"repositories:write","security":[{"bearerAuth":["repositories:write"]}]},"delete":{"operationId":"deleteRepository","summary":"Delete repository","description":"Delete a GitHub repository from Inspect and cancel its active environment build. Requires repository management permission.","parameters":[{"name":"repository_id","in":"path","required":true,"description":"Repository identifier","schema":{"$ref":"#/components/schemas/Repositories.RepositoryId"}}],"responses":{"204":{"description":"Deleted repository"},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/RepositoryManagementForbiddenError"},{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}]}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryNotFoundError"}}}}},"tags":["Repositories"],"x-api-key-scope":"repositories:write","security":[{"bearerAuth":["repositories:write"]}]}},"/api/v2/sessions":{"get":{"operationId":"listSessions","summary":"List sessions","description":"List sessions. By default returns only sessions owned by the authenticated user. Use `all=true` to return all sessions. Private sessions are excluded from this discoverable listing unless the API key user owns or participates in them; fetch other sessions by direct session ID instead.","parameters":[{"name":"all","in":"query","required":false,"description":"If true, return all sessions (not just the authenticated user's).","schema":{"type":"boolean","default":false},"explode":false},{"name":"include_archived","in":"query","required":false,"description":"If true, include archived (deleted) sessions in the results.","schema":{"type":"boolean","default":false},"explode":false},{"name":"repository","in":"query","required":false,"description":"Filter by repository ID","schema":{"type":"string"},"explode":false},{"name":"pull_request_number","in":"query","required":false,"description":"Filter by pull request number","schema":{"type":"number"},"explode":false},{"name":"branch","in":"query","required":false,"description":"Filter by branch name. Also matches the current head branch of pull requests the session opened.","schema":{"type":"string"},"explode":false},{"name":"agent_id","in":"query","required":false,"description":"Filter by custom agent ID","schema":{"type":"string"},"explode":false},{"name":"slack_thread","in":"query","required":false,"description":"Filter by linked Slack thread in `channel_id:thread_ts` format.","schema":{"type":"string"},"explode":false},{"name":"tag","in":"query","required":false,"description":"Filter by a single session tag (exact, case-sensitive match). By default matches tags added by each session owner; combine with `tagged_by` to match tags added by a specific user instead.","schema":{"type":"string"},"explode":false},{"name":"tagged_by","in":"query","required":false,"description":"Email of the Inspect user whose tags should be used for the `tag` filter and surfaced in each returned session's `tags` field. Defaults to each session's owner. Returns 400 when no Inspect user exists for the email.","schema":{"type":"string","format":"email"},"explode":false},{"name":"start_date","in":"query","required":false,"description":"Filter sessions created on or after this date. ISO 8601 format (e.g. 2025-01-01T00:00:00Z); date-only values use the server's local time.","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"explode":false},{"name":"end_date","in":"query","required":false,"description":"Filter sessions created on or before this date. ISO 8601 format (e.g. 2025-12-31T23:59:59Z); date-only values use the server's local time.","schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"string","format":"date"}]},"explode":false},{"name":"sort_by","in":"query","required":false,"description":"Sort order for sessions by creation time. Defaults to newest first.","schema":{"$ref":"#/components/schemas/Sessions.SessionSortOrder","default":"created_at_desc"},"explode":false},{"name":"limit","in":"query","required":false,"description":"Maximum number of sessions to return (1-100)","schema":{"$ref":"#/components/schemas/Sessions.SessionPageSize","default":100},"explode":false},{"name":"after","in":"query","required":false,"description":"Cursor for pagination. Use `meta.next_cursor` from a previous response with the same `sort_by`.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"List of sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SessionList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/InvalidSlackThreadError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"}]}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]},"post":{"operationId":"createSession","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional client-supplied key for safe retries. A same-key retry from the same API key user returns the originally-created session (HTTP 200) instead of creating a duplicate. Blank keys are ignored; otherwise 8 to 255 characters. Idempotency is keyed per API key user.","schema":{"type":"string","maxLength":255}}],"description":"Create a new Inspect session with an initial prompt. Accepts either `application/json` or `multipart/form-data`. Use multipart when you need to upload file attachments alongside the prompt; put the JSON request in the `data` field.\n\nSupports an `Idempotency-Key` request header. When the same key is sent twice from the same API key, the second call returns the originally-created session (HTTP 200) instead of creating a new one. Keys are scoped per API key user and remain valid until the originally-created session is archived; a same-key request after archive starts a fresh session.","summary":"Create session","responses":{"200":{"description":"Idempotency-Key replay - returns the session originally created for this key.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"201":{"description":"Session created successfully","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestBodyError"},{"$ref":"#/components/schemas/InvalidIdempotencyKeyError"},{"$ref":"#/components/schemas/InvalidBaseBranchError"},{"$ref":"#/components/schemas/InvalidModelError"},{"$ref":"#/components/schemas/InvalidModelVariantError"},{"$ref":"#/components/schemas/InvalidServiceTierError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/UserNotFoundError"},{"$ref":"#/components/schemas/UnsupportedReviewerError"},{"$ref":"#/components/schemas/PrivateAgentNotAllowedError"},{"$ref":"#/components/schemas/CallbackUrlNotAllowedError"},{"$ref":"#/components/schemas/PromptRequiredError"},{"$ref":"#/components/schemas/PullRequestNotAdoptableError"},{"$ref":"#/components/schemas/PullRequestBranchMismatchError"},{"$ref":"#/components/schemas/BaseCommitRequiredError"},{"$ref":"#/components/schemas/RepositoryNotAllowedError"},{"$ref":"#/components/schemas/UnknownRepositoryError"},{"$ref":"#/components/schemas/SessionProjectChangeNotAllowedError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/ImpersonationNotAllowedError"},{"$ref":"#/components/schemas/PreviewQaSessionNotAllowedError"},{"$ref":"#/components/schemas/ProjectForbiddenError"}]}}}},"404":{"description":"Inspect GitHub App is not connected to this Inspect organization","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GithubAppNotConnectedError"},{"$ref":"#/components/schemas/AgentNotFoundError"},{"$ref":"#/components/schemas/ProjectNotFoundError"}]}}}},"409":{"description":"Your organization's concurrent session limit is reached. Wait for a session to finish.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConcurrentSessionLimitError"},{"$ref":"#/components/schemas/DailySessionLimitError"},{"$ref":"#/components/schemas/ActiveUserLimitError"},{"$ref":"#/components/schemas/NoModelsAvailableError"},{"$ref":"#/components/schemas/ProjectArchivedError"}]}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InternalError"},{"$ref":"#/components/schemas/Error"}]}}}}},"x-api-key-scope":"sessions:write","tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.CreateSessionRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Sessions.CreateSessionMultipartRequest"},"encoding":{"data":{"contentType":"application/json"},"attachments":{"contentType":"*/*"}}}}},"security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}":{"get":{"operationId":"getSession","summary":"Get session","description":"Retrieve details for a specific session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionDetail"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]},"patch":{"operationId":"updateSession","summary":"Update session","description":"Update session metadata. Only the session owner can update a session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/InvalidVisibilityError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/SessionForbiddenError"}]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateSessionRequest"}}}},"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]},"delete":{"operationId":"archiveSession","summary":"Archive session","description":"Archive a session by setting its deletedAt timestamp. Archived sessions are hidden from default list queries but can still be retrieved individually or by using include_archived=true. The session can be archived by the session owner or by the API key user who originally created the session (e.g. when using on_behalf_of).","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"name":"close_pull_request","in":"query","required":false,"description":"Whether to close the session pull request when archiving.","schema":{"type":"boolean","default":true},"explode":false}],"responses":{"204":{"description":"No content"},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/SessionForbiddenError"}]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}/cost":{"get":{"operationId":"getSessionCost","summary":"Get session cost","description":"Best-effort refresh the session durable-object export and return the latest persisted token totals and cost for a specific session. This can be used while a session is still running, without waiting for the scheduled export job. Totals include the usage of the session's subagents, such as Verification agent runs. Use GET /sessions/{session_id}/subagents/{subagent_id}/cost for a single subagent's usage. A session whose agent never started returns zero totals.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Latest session cost and token totals","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionCost"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/diff":{"get":{"operationId":"getSessionDiff","summary":"Get session diff","description":"Retrieve the raw unified diff for an authorized Inspect session. The endpoint is session-scoped and does not accept arbitrary diff file IDs. Pending or running sessions return the local working-tree diff when one is available; otherwise the stored authoritative session diff is returned.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"name":"repository","in":"query","required":false,"description":"Repository ID whose diff should be returned. Must be one of the session's `repositories`. Defaults to the first one.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"Raw unified diff for the session","headers":{"X-Inspect-Diff-Source":{"required":false,"description":"Source selected for this response: local for an active working-tree diff, or github for the authoritative GitHub diff. Omitted when the stored diff predates source tracking.","schema":{"type":"string","enum":["local","github"]}}},"content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Repository is not part of this session","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryNotInSessionError"},{"$ref":"#/components/schemas/ValidationError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/DiffNotFoundError"}]}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/messages":{"get":{"operationId":"getSessionMessages","summary":"List session messages","description":"Retrieve all messages for a specific session, including user prompts and assistant responses. If the session transcript exceeds the read limits, the response contains the latest history only and has the header `X-Inspect-Transcript-Truncated: true`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session messages","headers":{"X-Inspect-Transcript-Truncated":{"required":false,"description":"Set to `true` when the session transcript exceeded the read limits and only the latest history is returned.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.MessageList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}},"504":{"description":"Upstream request timed out","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamTimeoutError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/prompt":{"post":{"operationId":"sendPrompt","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"description":"Send a follow-up prompt to an existing session. Accepts either `application/json` or `multipart/form-data` (JSON request in the `data` field, files in `attachments`). By default prompts are delivered immediately. Set `delivery` to `queued` to enqueue the prompt behind active or outstanding work. If the session has no outstanding prompts, the prompt is delivered immediately and `queued_prompt` is omitted, restarting a dormant sandbox when necessary. Prompts that remain queued may not appear in `/messages` until they are released and processed.","summary":"Send prompt","responses":{"200":{"description":"Prompt accepted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptResult"}}}},"400":{"description":"Invalid request body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidRequestBodyError"},{"$ref":"#/components/schemas/InvalidModelError"},{"$ref":"#/components/schemas/InvalidModelVariantError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/UnsupportedReviewerError"},{"$ref":"#/components/schemas/PromptRequiredError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/ImpersonationNotAllowedError"},{"$ref":"#/components/schemas/PreviewQaSessionNotAllowedError"},{"$ref":"#/components/schemas/GithubAccountRequiredError"},{"$ref":"#/components/schemas/SessionForbiddenError"}]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"409":{"description":"Session changed while the prompt was being prepared. Retry the prompt.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionChangedError"},{"$ref":"#/components/schemas/NoModelsAvailableError"},{"$ref":"#/components/schemas/SessionCostLimitReachedError"},{"$ref":"#/components/schemas/ConcurrentSessionLimitError"}]}}}},"500":{"description":"Unhandled server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-api-key-scope":"sessions:write","tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptRequest"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Sessions.SendPromptMultipartRequest"},"encoding":{"data":{"contentType":"application/json"},"attachments":{"contentType":"*/*"}}}}},"security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}/stop":{"post":{"operationId":"stopSession","summary":"Stop session","description":"Interrupt the session's active turn without archiving it. Cancels any queued prompts and sets the session status to `finished`, but leaves `deletedAt` untouched — so a session that was previously archived and resumed can still be stopped. No-ops (returns the current session) when the session is not running. The session can be stopped by the session owner or by the API key user who originally created the session (e.g. when using on_behalf_of).","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Session","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/SessionForbiddenError"}]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}/subagents":{"get":{"operationId":"listSessionSubagents","summary":"List session subagents","description":"List the subagents of a session, newest first, including Verification agent runs Inspect started for it. Subagents are not sessions: read them through the subagent endpoints of their parent session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Subagents of the session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.SessionSubagentList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/subagents/{subagent_id}/cost":{"get":{"operationId":"getSessionSubagentCost","summary":"Get session subagent cost","description":"Return the token totals and cost of a subagent of the session, including its own subagents. `sessionId` is the subagent ID and messageCount is always 0. Returns 404 when the subagent does not belong to the session.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"$ref":"#/components/parameters/Sessions.SessionSubagentIdParams.subagent_id"}],"responses":{"200":{"description":"Latest session cost and token totals","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionCost"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SubagentNotFoundError"}]}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/subagents/{subagent_id}/messages":{"get":{"operationId":"getSessionSubagentMessages","summary":"List session subagent messages","description":"Retrieve the messages of a subagent of the session, in the same shape as GET /sessions/{session_id}/messages. Returns 404 when the subagent does not belong to the session. If the transcript exceeds the read limits, the response contains the latest history only and has the header `X-Inspect-Transcript-Truncated: true`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"},{"$ref":"#/components/parameters/Sessions.SessionSubagentIdParams.subagent_id"}],"responses":{"200":{"description":"Session messages","headers":{"X-Inspect-Transcript-Truncated":{"required":false,"description":"Set to `true` when the session transcript exceeded the read limits and only the latest history is returned.","schema":{"type":"string","enum":["true"]}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.MessageList"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionNotFoundError"},{"$ref":"#/components/schemas/SubagentNotFoundError"}]}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Sessions"],"x-api-key-scope":"sessions:read","security":[{"bearerAuth":["sessions:read"]}]}},"/api/v2/sessions/{session_id}/tags":{"put":{"operationId":"updateSessionTags","summary":"Replace session tags","description":"Replace the set of tags that the API key's user has applied to a session. Tags are scoped per user: this endpoint only affects tags added by the calling API key's user and never modifies tags added by the session owner or anyone else. Passing an empty array removes all of the caller's tags from the session. The operation is idempotent, making it suitable for pipelines that periodically reconcile labels onto sessions. Find sessions by these tags with `GET /sessions?tag=...&tagged_by=<caller email>`.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"The caller's tags on the session were replaced","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionTags"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryAccessDeniedError"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateSessionTagsRequest"}}}},"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}/update-base-branch":{"post":{"operationId":"updateSessionBaseBranch","summary":"Update session base branch","description":"Update the base branch for a session's first repository. The branch must exist in the session repository. If the session already has an open pull request, its base branch is updated on GitHub as well. Only the session owner can update the base branch. Returns 400 when the branch or repository is invalid (including a branch that does not exist), 409 when the session's pull request is merged or closed, 502 when updating the pull request on GitHub fails, and 500 when the new base branch could not be saved.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"200":{"description":"Base branch update result.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.UpdateBaseBranchSuccess"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/InvalidBaseBranchError"},{"$ref":"#/components/schemas/RepositoryRequiredError"},{"$ref":"#/components/schemas/RepositoryNotInSessionError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/SessionForbiddenError"}]}}}},"404":{"description":"Inspect GitHub App is not connected to this Inspect organization","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GithubAppNotConnectedError"},{"$ref":"#/components/schemas/SessionNotFoundError"}]}}}},"409":{"description":"The session's pull request is merged or closed. Start a new session instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullRequestNotOpenError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InternalError"},{"$ref":"#/components/schemas/Error"}]}}}},"502":{"description":"Upstream request failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpstreamError"}}}}},"tags":["Sessions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.UpdateBaseBranchRequest"}}}},"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/sessions/{session_id}/verification":{"post":{"operationId":"startSessionVerification","summary":"Start session verification","description":"Start or rerun the Verification agent on the current head of the session's pull request. A new run supersedes any older run for that pull request. Runs even when the session owner has turned off automatic Verification agent runs, as long as the repository configures verification at `.inspect/verification/config.yml`. The session owner or the API key user who originally created the session can start a run; read-only API keys cannot start runs in writable sessions. Returns 202 when a run started or was already running, 400 when the session has pull requests in multiple repositories and no repository was given, and 409 with a `verification_*` code when no run started.","parameters":[{"$ref":"#/components/parameters/Sessions.SessionIdParam"}],"responses":{"202":{"description":"Verification agent run started or already running","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.SessionVerificationStarted"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/MalformedJsonError"},{"$ref":"#/components/schemas/RepositoryRequiredError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"This API key is not allowed to access this repository","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RepositoryAccessDeniedError"},{"$ref":"#/components/schemas/ApiKeyIpNotAllowedError"},{"$ref":"#/components/schemas/SessionForbiddenError"},{"$ref":"#/components/schemas/GithubAccountRequiredError"}]}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"409":{"description":"This session has no pull request to verify.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/VerificationNoPullRequestError"},{"$ref":"#/components/schemas/VerificationNotConfiguredError"},{"$ref":"#/components/schemas/VerificationReadonlyError"},{"$ref":"#/components/schemas/VerificationNoRuntimeError"},{"$ref":"#/components/schemas/VerificationSessionPredatesVerifierError"}]}}}}},"tags":["Sessions"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sessions.StartSessionVerificationRequest"}}}},"x-api-key-scope":"sessions:write","security":[{"bearerAuth":["sessions:write"]}]}},"/api/v2/skills":{"get":{"operationId":"listSkills","summary":"List skills","description":"List active skills in the catalog, including built-in skills. Filter by a case-insensitive `query` that matches the skill ID or description. Use `GET /api/v2/skills/{skill_id}` for skill files.","parameters":[{"name":"query","in":"query","required":false,"description":"Optional text to match against skill IDs and descriptions.","schema":{"type":"string"},"explode":false},{"name":"limit","in":"query","required":false,"description":"Maximum number of skills to return.","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":20},"explode":false}],"responses":{"200":{"description":"Matching skills","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.SkillSummaryList"}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["Skills"],"x-api-key-scope":"skills:read","security":[{"bearerAuth":["skills:read"]}]},"post":{"operationId":"createSkill","summary":"Create skill","description":"Create a skill owned by the API key user. Provide either `content` (the `SKILL.md` body) or `files` (the complete file set, which must include `SKILL.md`). Creating a skill with the ID of an archived skill restores it; only its original owner or an admin can do this.","parameters":[],"responses":{"201":{"description":"Skill created","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidSkillError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/SkillForbiddenError"}]}}}},"409":{"description":"A skill with this ID already exists or is built into Inspect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillConflictError"}}}},"413":{"description":"Skill request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRequestTooLargeError"}}}}},"tags":["Skills"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.CreateSkillRequest"}}}},"x-api-key-scope":"skills:write","security":[{"bearerAuth":["skills:write"]}]}},"/api/v2/skills/{skill_id}":{"get":{"operationId":"getSkill","summary":"Get skill","description":"Retrieve an active skill, including every file, its owner, and its collaborators.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Skill ID","schema":{"$ref":"#/components/schemas/Skills.SkillPathId"}}],"responses":{"200":{"description":"Skill details","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNotFoundError"}}}}},"tags":["Skills"],"x-api-key-scope":"skills:read","security":[{"bearerAuth":["skills:read"]}]},"patch":{"operationId":"updateSkill","summary":"Update skill","description":"Update or rename a skill. Omitted fields are unchanged. `files` replaces the complete file set and must include `SKILL.md`; `content` replaces only `SKILL.md`. Renaming updates references from user settings and custom agents. Only the owner, a collaborator, or an admin can update a skill; built-in skills are read-only.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Current skill ID","schema":{"$ref":"#/components/schemas/Skills.SkillPathId"}}],"responses":{"200":{"description":"Skill updated","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Skills.Skill"}}}}}},"400":{"description":"Invalid request parameters or body","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/InvalidSkillError"},{"$ref":"#/components/schemas/MalformedJsonError"}]}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/SkillForbiddenError"}]}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNotFoundError"}}}},"409":{"description":"A skill with this ID already exists or is built into Inspect","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillConflictError"}}}},"413":{"description":"Skill request body is too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillRequestTooLargeError"}}}}},"tags":["Skills"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Skills.UpdateSkillRequest"}}}},"x-api-key-scope":"skills:write","security":[{"bearerAuth":["skills:write"]}]},"delete":{"operationId":"archiveSkill","summary":"Archive skill","description":"Archive a skill so it no longer appears in the catalog or loads for agents. Only the owner, a collaborator, or an admin can archive a skill; built-in skills cannot be archived.","parameters":[{"name":"skill_id","in":"path","required":true,"description":"Skill ID","schema":{"$ref":"#/components/schemas/Skills.SkillPathId"}}],"responses":{"204":{"description":"Skill archived"},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}},"403":{"description":"Read-only API keys cannot make this change","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ReadOnlyApiKeyError"},{"$ref":"#/components/schemas/SkillForbiddenError"}]}}}},"404":{"description":"Skill not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNotFoundError"}}}}},"tags":["Skills"],"x-api-key-scope":"skills:write","security":[{"bearerAuth":["skills:write"]}]}},"/api/v2/user/preferences":{"get":{"operationId":"getUserPreferences","summary":"Get user preferences","description":"Retrieve the authenticated user's preferences, including their default model and agent.","parameters":[],"responses":{"200":{"description":"User preferences","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/User.UserPreferences"}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthenticatedError"}}}}},"tags":["User"],"x-api-key-scope":"user:read","security":[{"bearerAuth":["user:read"]}]}}},"security":[{"bearerAuth":[]}],"components":{"parameters":{"Artifacts.ListArtifactsQuery.after":{"name":"after","in":"query","required":false,"description":"Cursor for pagination. Use `meta.next_cursor` from a previous response.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactCursor"},"explode":false},"Artifacts.ListArtifactsQuery.first":{"name":"first","in":"query","required":false,"description":"Number of results to return (max 100).","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactPageSize","default":50},"explode":false},"Artifacts.ListArtifactsQuery.query":{"name":"query","in":"query","required":false,"description":"Full-text search across title, URL, and description.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactSearchQuery"},"explode":false},"Artifacts.ListArtifactsQuery.type":{"name":"type","in":"query","required":false,"description":"Filter artifacts by type.","schema":{"$ref":"#/components/schemas/Artifacts.ArtifactType"},"explode":false},"Previews.PreviewParams.name":{"name":"name","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Previews.PreviewName"}},"Previews.PullRequestParams.owner":{"name":"owner","in":"path","required":true,"description":"GitHub repository owner.","schema":{"$ref":"#/components/schemas/Previews.RepositoryOwner","minLength":1}},"Previews.PullRequestParams.pull_request_number":{"name":"pull_request_number","in":"path","required":true,"description":"Pull request number.","schema":{"$ref":"#/components/schemas/Previews.PullRequestNumber"}},"Previews.PullRequestParams.repo":{"name":"repo","in":"path","required":true,"description":"GitHub repository name.","schema":{"$ref":"#/components/schemas/Previews.RepositoryName","minLength":1}},"Projects.ProjectIdParam":{"name":"project_id","in":"path","required":true,"description":"The unique identifier of the project","schema":{"$ref":"#/components/schemas/Projects.ProjectId"}},"Sessions.SessionIdParam":{"name":"session_id","in":"path","required":true,"description":"The unique identifier of the session","schema":{"$ref":"#/components/schemas/Sessions.SessionId"}},"Sessions.SessionSubagentIdParams.subagent_id":{"name":"subagent_id","in":"path","required":true,"description":"The unique identifier of a subagent of the session","schema":{"$ref":"#/components/schemas/Sessions.SessionSubagentId"}}},"schemas":{"ActiveUserLimitError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["active_user_limit"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AgentForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AgentNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["agent_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Agents.Agent":{"type":"object","required":["id","name","description","model","builtin","created_at"],"properties":{"id":{"type":"string","description":"Unique identifier for the agent","examples":["r4t8w2n6b9qe"]},"name":{"type":"string","description":"Display name of the agent","examples":["Release Captain"]},"description":{"type":"string","description":"Description of what this agent does","examples":["Drafts release notes and checks deploy readiness for acme/web."]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Preferred model for this agent, or null to use the default","examples":["claude-opus-5-5"]},"builtin":{"type":"boolean","description":"Whether this is a built-in agent","examples":[false]},"created_at":{"type":"string","format":"date-time","description":"When the agent was created","examples":["2026-10-28T15:42:11.204Z"]}}},"Agents.AgentCapabilities":{"type":"object","required":["edit","git_write","browser","user_skills","repository_skills","datadog","customer_data_access","notion","inspect_sessions","web_search","artifacts","tools"],"properties":{"edit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"git_write":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[false]},"browser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"user_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"repository_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"datadog":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"customer_data_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Deprecated.","deprecated":true,"examples":[null]},"notion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"inspect_sessions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"artifacts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"tools":{"type":"object","unevaluatedProperties":{"type":"boolean"},"description":"Per-tool enablement overrides. Empty when no tool is overridden.","examples":[{"web_fetch":false}]}},"description":"Deprecated capability and tool overrides. A null capability retains its default. Not an access-control boundary; see the `capabilities` field."},"Agents.AgentCapabilitiesInput":{"type":"object","properties":{"edit":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"git_write":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[false]},"browser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"user_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"repository_skills":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"datadog":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"customer_data_access":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Deprecated.","deprecated":true,"examples":[null]},"notion":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"inspect_sessions":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"web_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[true]},"artifacts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"examples":[null]},"tools":{"type":"object","unevaluatedProperties":{"type":"boolean"},"description":"Per-tool enablement overrides. Empty when no tool is overridden.","examples":[{"web_fetch":false}]}},"description":"Deprecated capability and tool overrides. Omitted or null capabilities retain their defaults. Not an access-control boundary; see the `capabilities` field.","additionalProperties":false},"Agents.AgentDetail":{"type":"object","required":["prompt","created_by","skills","capabilities","prompt_context_mode","repositories","repository_hint"],"properties":{"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"System prompt for this agent, or null when not set","examples":["You are the release captain for acme/web. Summarize merged pull requests since the last tag, flag risky migrations, and draft release notes."]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User id of the creator, if any","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"skills":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Configured skills for this agent","examples":[["deslop","release-notes"]]},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilities"},{"type":"null"}],"description":"Deprecated.","deprecated":true},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"How this agent applies its custom prompt: append keeps the tuned base system prompt, replace uses the custom prompt as the primary system prompt.","examples":["append"]},"repositories":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repository allowlist for this agent, or null when unrestricted","examples":[["web"]]},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional repository hint string","examples":["acme/web"]}},"allOf":[{"$ref":"#/components/schemas/Agents.Agent"}],"description":"Full agent configuration for a single ID. Includes fields not present on the list-agents response."},"Agents.AgentId":{"type":"string","examples":["r4t8w2n6b9qe"]},"Agents.AgentList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agents.Agent"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Agents.AgentVersion":{"type":"object","required":["version","prompt","created_at","created_by"],"properties":{"version":{"type":"integer","format":"int32","description":"Monotonic prompt version number","examples":[3]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Prompt saved in this version","examples":["You are the release captain for acme/web. Summarize merged pull requests since the last tag, flag risky migrations, and draft release notes."]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"created_by":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentVersionAuthor"},{"type":"null"}],"description":"User who saved this version, when known"}}},"Agents.AgentVersionAuthor":{"type":"object","required":["id","name","email"],"properties":{"id":{"type":"string","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"name":{"type":"string","examples":["Jane Doe"]},"email":{"type":"string","examples":["jane@acme.com"]}}},"Agents.AgentVersionList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Agents.AgentVersion"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Agents.CreateAgentRequest":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the agent.","examples":["Release Captain"]},"description":{"type":"string","description":"Description of what this agent does","examples":["Drafts release notes and checks deploy readiness for acme/web."],"default":""},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100000,"description":"System prompt, or null to clear it","examples":["You are the release captain for acme/web. Summarize merged pull requests since the last tag, flag risky migrations, and draft release notes."],"default":null},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":200,"description":"Preferred model, or null to use the default. Any string up to 200 characters is stored; it is not checked against the model list.","examples":["claude-opus-5-5"],"default":null},"skills":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.SkillName"}},{"type":"null"}],"description":"Configured skill names, or null for no explicit skill list","examples":[["deslop","release-notes"]],"default":null},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilitiesInput"},{"type":"null"}],"description":"Deprecated.","deprecated":true,"default":null},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"Whether the custom prompt appends to or replaces the base system prompt","examples":["append"],"default":"append"},"repositories":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.WorkspaceId"}},{"type":"null"}],"description":"Repository allowlist containing configured repository IDs; null means unrestricted","examples":[["web"]],"default":null},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional default repository hint","examples":["acme/web"],"default":null}},"additionalProperties":false},"Agents.PromptContextMode":{"type":"string","enum":["append","replace"]},"Agents.SkillName":{"type":"string","minLength":1},"Agents.UpdateAgentRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name of the agent.","examples":["Release Captain"]},"description":{"type":"string","description":"Description of what this agent does","examples":["Drafts release notes and checks deploy readiness for acme/web."]},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100000,"description":"System prompt, or null to clear it","examples":["You are the release captain for acme/web. Summarize merged pull requests since the last tag, flag risky migrations, and draft release notes."]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":200,"description":"Preferred model, or null to use the default. Any string up to 200 characters is stored; it is not checked against the model list.","examples":["claude-opus-5-5"]},"skills":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.SkillName"}},{"type":"null"}],"description":"Configured skill names, or null for no explicit skill list","examples":[["deslop","release-notes"]]},"capabilities":{"anyOf":[{"$ref":"#/components/schemas/Agents.AgentCapabilitiesInput"},{"type":"null"}],"description":"Deprecated.","deprecated":true},"prompt_context_mode":{"$ref":"#/components/schemas/Agents.PromptContextMode","description":"Whether the custom prompt appends to or replaces the base system prompt","examples":["append"]},"repositories":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Agents.WorkspaceId"}},{"type":"null"}],"description":"Repository allowlist containing configured repository IDs; null means unrestricted","examples":[["web"]]},"repository_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional default repository hint","examples":["acme/web"]}},"description":"At least one field must be provided.","additionalProperties":false,"minProperties":1},"Agents.WorkspaceId":{"type":"string","minLength":1,"description":"Configured Inspect repository ID"},"ApiKeyIpNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["api_key_ip_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ArtifactFieldImmutableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["artifact_field_immutable"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ArtifactNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["artifact_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ArtifactStorageUnavailableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["artifact_storage_unavailable"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ArtifactUrlConflictError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["artifact_url_conflict"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ArtifactValidationFailedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["validation_failed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Artifacts.Artifact":{"anyOf":[{"$ref":"#/components/schemas/Artifacts.LinkArtifact"},{"$ref":"#/components/schemas/Artifacts.FileArtifact"},{"$ref":"#/components/schemas/Artifacts.SessionReplayArtifact"}],"description":"An artifact, discriminated by `type`: `file` and `session_replay` have their own shapes; every other type is a `LinkArtifact`."},"Artifacts.ArtifactBase":{"type":"object","required":["id","title","description","created_at"],"properties":{"id":{"type":"string","description":"Unique artifact identifier","examples":["x7k2m9q4p1za"]},"title":{"type":"string","description":"Artifact title","examples":["Cell rollout runbook"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description","examples":["Steps for approving canary and production cell deployments."]},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created","examples":["2026-10-28T15:42:11.204Z"]}}},"Artifacts.ArtifactCursor":{"type":"string","maxLength":1024},"Artifacts.ArtifactDescription":{"type":"string","minLength":10,"maxLength":2000},"Artifacts.ArtifactId":{"type":"string","examples":["x7k2m9q4p1za"]},"Artifacts.ArtifactList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Artifacts.Artifact"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Artifacts.ArtifactPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Artifacts.ArtifactSearchQuery":{"type":"string","minLength":1,"maxLength":200},"Artifacts.ArtifactTitle":{"type":"string","minLength":1,"maxLength":200},"Artifacts.ArtifactType":{"type":"string","enum":["link","doc","ticket","message","channel","dashboard","pdf","design","feature_flag","file","session_replay"]},"Artifacts.ArtifactUrl":{"type":"string","format":"uri","maxLength":2048,"description":"HTTP(S) URL without credentials or local/private host literals. Stored in WHATWG-canonical form."},"Artifacts.CreateArtifactMeta":{"type":"object","required":["created"],"properties":{"created":{"type":"boolean","description":"False when an artifact with the same canonical URL already existed; that artifact is returned unchanged.","examples":[true]}}},"Artifacts.CreateArtifactRequest":{"type":"object","required":["type","title","url","description"],"properties":{"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType","examples":["doc"]},"title":{"$ref":"#/components/schemas/Artifacts.ArtifactTitle","examples":["Cell rollout runbook"]},"url":{"$ref":"#/components/schemas/Artifacts.ArtifactUrl","examples":["https://www.notion.so/acme/Cell-rollout-runbook-1f2e3d4c5b6a"]},"description":{"$ref":"#/components/schemas/Artifacts.ArtifactDescription","examples":["Steps for approving canary and production cell deployments."]}}},"Artifacts.CreateArtifactResult":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/Artifacts.Artifact"},"meta":{"$ref":"#/components/schemas/Artifacts.CreateArtifactMeta"}}},"Artifacts.FileArtifact":{"type":"object","required":["id","title","description","created_at","type","url","upload_id","file_name","mime_type"],"properties":{"id":{"type":"string","description":"Unique artifact identifier","examples":["x7k2m9q4p1za"]},"title":{"type":"string","description":"Artifact title","examples":["Cell rollout runbook"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description","examples":["Steps for approving canary and production cell deployments."]},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created","examples":["2026-10-28T15:42:11.204Z"]},"type":{"type":"string","enum":["file"]},"url":{"type":"string","format":"uri","description":"Signed download URL for the file, issued with each response. Works without an Inspect sign-in and expires after 30 days; fetch the artifact again for a fresh URL.","examples":["https://app.inspect.com/api/public/uploads/3f9c2b7e-8d41-4a6f-b5e2-9c0d1a7e4b63/p9d4h7s2k5vm.csv?token=1793986042%3AqJ8vK2mXw9LrT4nB7cYd1eFgH5sZ0aUiO3pE6tWjN-k"]},"upload_id":{"type":"string","description":"Identifier of the stored upload","examples":["p9d4h7s2k5vm.csv"]},"file_name":{"type":"string","description":"File name, including its extension","examples":["signup-funnel.csv"]},"mime_type":{"type":"string","description":"MIME type of the file","examples":["text/csv"]}},"description":"A file uploaded from a session."},"Artifacts.LinkArtifact":{"type":"object","required":["id","title","description","created_at","type","url"],"properties":{"id":{"type":"string","description":"Unique artifact identifier","examples":["x7k2m9q4p1za"]},"title":{"type":"string","description":"Artifact title","examples":["Cell rollout runbook"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description","examples":["Steps for approving canary and production cell deployments."]},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created","examples":["2026-10-28T15:42:11.204Z"]},"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType","examples":["doc"]},"url":{"type":"string","format":"uri","description":"URL of the resource","examples":["https://www.notion.so/acme/Cell-rollout-runbook-1f2e3d4c5b6a"]}},"description":"A pointer to an external resource, such as a doc, ticket, or dashboard."},"Artifacts.LinkArtifactType":{"type":"string","enum":["link","doc","ticket","message","channel","dashboard","pdf","design","feature_flag"],"description":"Types of artifacts that point at an external resource. Only these types can be created or re-categorized through the API; `file` and `session_replay` artifacts are produced by sessions."},"Artifacts.SessionReplayArtifact":{"type":"object","required":["id","title","description","created_at","type","url","session_id","replay_id","recording","markers"],"properties":{"id":{"type":"string","description":"Unique artifact identifier","examples":["x7k2m9q4p1za"]},"title":{"type":"string","description":"Artifact title","examples":["Cell rollout runbook"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Artifact description","examples":["Steps for approving canary and production cell deployments."]},"created_at":{"type":"string","format":"date-time","description":"When the artifact was created","examples":["2026-10-28T15:42:11.204Z"]},"type":{"type":"string","enum":["session_replay"]},"url":{"type":"string","format":"uri","description":"URL of the replay player. Viewing it requires access to the session that captured the replay.","examples":["https://app.inspect.com/api/session-replays/h2w7n4c9x5mk/6f1c2d3e-4b5a-4968-8776-a5b4c3d2e1f0"]},"session_id":{"type":"string","description":"Identifier of the Inspect session that captured the replay","examples":["h2w7n4c9x5mk"]},"replay_id":{"type":"string","description":"Replay identifier","examples":["6f1c2d3e-4b5a-4968-8776-a5b4c3d2e1f0"]},"recording":{"$ref":"#/components/schemas/Artifacts.SessionReplayRecording"},"markers":{"type":"array","items":{"$ref":"#/components/schemas/Artifacts.SessionReplayMarker"}}},"description":"A Datadog session replay captured by a session."},"Artifacts.SessionReplayMarker":{"type":"object","required":["label","occurred_at","color"],"properties":{"label":{"type":"string","description":"Short description of the recorded event","examples":["Save button stayed disabled"]},"occurred_at":{"type":"string","format":"date-time","description":"When the event happened","examples":["2026-10-26T14:01:31.000Z"]},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS color for the timeline marker","examples":["#e5484d"]}},"description":"A marked event on the replay timeline."},"Artifacts.SessionReplayRecording":{"type":"object","required":["datadog_session_id","application_id","application_name","user_email","datadog_url","started_at","ended_at","view_count"],"properties":{"datadog_session_id":{"type":"string","description":"Datadog RUM session identifier","examples":["0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e"]},"application_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Datadog RUM application identifier","examples":["a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"]},"application_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Datadog RUM application name","examples":["acme-web"]},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email of the user recorded in the replay","examples":["jane@acme.com"]},"datadog_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Link to the session in Datadog","examples":["https://app.datadoghq.com/rum/replay/sessions/0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e"]},"started_at":{"type":"string","format":"date-time","description":"When the recording starts","examples":["2026-10-26T13:58:40.000Z"]},"ended_at":{"type":"string","format":"date-time","description":"When the recording ends","examples":["2026-10-26T14:02:12.000Z"]},"view_count":{"type":"integer","format":"int32","description":"Number of views recorded","examples":[3]}},"description":"Datadog RUM session the replay was recorded from."},"Artifacts.UpdateArtifactRequest":{"type":"object","properties":{"title":{"$ref":"#/components/schemas/Artifacts.ArtifactTitle","examples":["Cell rollout runbook (2026)"]},"description":{"$ref":"#/components/schemas/Artifacts.ArtifactDescription"},"url":{"$ref":"#/components/schemas/Artifacts.ArtifactUrl"},"type":{"$ref":"#/components/schemas/Artifacts.LinkArtifactType"}},"description":"Provide at least one field to update. `url` and `type` can only be changed on link artifacts.","minProperties":1},"AutomationArchivedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["automation_archived"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AutomationConflictError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["automation_conflict"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AutomationForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AutomationIntegrationUnavailableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["integration_unavailable"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AutomationInvalidRequestBodyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_request_body"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"AutomationNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["automation_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Automations.AutoAddressPrReviewBuddyPolicy":{"type":"object","required":["enabled","enabled_finding_types"],"properties":{"enabled":{"type":"boolean","examples":[true]},"enabled_finding_types":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewFindingType"},"examples":[["critical","warning"]]}}},"Automations.AutoAddressPrReviewBuddyPolicyInput":{"type":"object","required":["enabled_finding_types"],"properties":{"enabled":{"type":"boolean","examples":[true]},"enabled_finding_types":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewFindingType"},"examples":[["critical","warning"]]}},"additionalProperties":false},"Automations.AutoAddressPrReviewFindingType":{"type":"string","enum":["critical","warning","suggestion"]},"Automations.AutoAddressPrReviewIdentityRule":{"type":"object","required":["selector","rule_type"],"properties":{"selector":{"type":"string","minLength":1,"description":"GitHub identity selector key.","examples":["bot:49699333"]},"rule_type":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRuleType","examples":["block"]}},"additionalProperties":false},"Automations.AutoAddressPrReviewIdentityRuleType":{"type":"string","enum":["allow","block"]},"Automations.AutoAddressPrReviewReviewerCategories":{"type":"object","required":["human","bot"],"properties":{"human":{"type":"boolean","examples":[true]},"bot":{"type":"boolean","examples":[false]}},"additionalProperties":false},"Automations.AutoAddressPrReviewsPolicy":{"type":"object","required":["enabled","reviewer_categories","identity_rules","review_buddy"],"properties":{"enabled":{"type":"boolean","examples":[true]},"reviewer_categories":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewReviewerCategories"},"identity_rules":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRule"}},"review_buddy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewBuddyPolicy"}},"description":"PR review auto-addressing policy."},"Automations.AutoAddressPrReviewsPolicyInput":{"type":"object","required":["enabled","reviewer_categories","identity_rules","review_buddy"],"properties":{"enabled":{"type":"boolean","examples":[true]},"reviewer_categories":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewReviewerCategories"},"identity_rules":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewIdentityRule"}},"review_buddy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewBuddyPolicyInput"}},"description":"PR review auto-addressing policy. Requests reject unknown fields.","additionalProperties":false},"Automations.Automation":{"type":"object","required":["id","name","description","prompt","repositories","triggers","slack_channel_id","post_to_slack_on_start","slack_mention_users","notify_collaborators_on_merge","run_as","owner","collaborators","model_id","agent_id","autofix_ci_failures","auto_address_pull_request_reviews_policy","template_variables","enabled","last_run_at","next_run_at","archived_at","created_at","updated_at","viewer_can_edit"],"properties":{"id":{"type":"string","description":"Unique automation identifier","examples":["k3v8n2w6q9ts"]},"name":{"type":"string","description":"Automation name","examples":["Triage failing CI on main"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description","examples":["Investigates failing checks on main and opens a pull request with a fix."]},"prompt":{"type":"string","description":"Prompt template sent to the agent","examples":["Investigate the failing {{check_name}} check on main for the {{service}} service and open a pull request with a fix."]},"repositories":{"type":"array","items":{"type":"string"},"description":"Repository IDs the automation targets","examples":[["web"]]},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTrigger"},"description":"Trigger definitions"},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Slack channel to post session updates to. Null when the viewer cannot edit the automation.","examples":["C03KH3AGN2G"]},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start. False when the viewer cannot edit the automation.","examples":[true]},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMention"},"description":"Slack users and user groups mentioned in automation posts. Empty when the viewer cannot edit the automation."},"notify_collaborators_on_merge":{"type":"boolean","description":"Whether automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available.","examples":[false]},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this.","examples":["owner"]},"owner":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationCollaborator"},{"type":"null"}],"description":"User who owns the automation. Null for system-owned automations."},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationCollaborator"},"description":"Users who can view and edit this automation from Automations. The automation owner is always included in this list. Empty when the viewer cannot edit the automation."},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model override","examples":["claude-opus-5-5"]},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Custom agent override","examples":["h2w9c4m7k1xz"]},"autofix_ci_failures":{"type":"boolean","description":"Whether sessions created by this automation automatically respond to CI failures.","examples":[true]},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicy"},{"type":"null"}],"description":"PR review auto-addressing policy applied to sessions. Null follows the owner user setting."},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinition"},"description":"Template variable definitions","examples":[{"service":{"label":"Service","value_type":"text","default_value":"web","options":["web","api","worker"]}}]},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Manual-only automations do not have an enable/disable state.","examples":[true]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation last ran","examples":["2026-10-29T13:00:04.512Z"]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation is next scheduled to run","examples":["2026-10-30T13:00:00.000Z"]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the automation was archived, null if active","examples":[null]},"created_at":{"type":"string","format":"date-time","description":"When the automation was created","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","description":"When the automation was last updated","examples":["2026-10-28T16:05:37.918Z"]},"viewer_can_edit":{"type":"boolean","description":"Whether the authenticated user owns or collaborates on this automation. When false, destinations, collaborators, and agent execution settings are redacted.","examples":[true]}}},"Automations.AutomationBranchName":{"type":"string","maxLength":250},"Automations.AutomationBranchPattern":{"type":"string","minLength":1,"maxLength":250},"Automations.AutomationCheckName":{"type":"string","minLength":1,"maxLength":250},"Automations.AutomationCollaborator":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string","description":"User id","examples":["Vq3kZ8xN2pLm7RtY4wHc9JbF6sDg1aEu"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User display name","examples":["Jane Doe"]},"email":{"type":"string","description":"User email","examples":["jane@acme.com"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User avatar URL","examples":["https://avatars.githubusercontent.com/u/5831047?v=4"]}}},"Automations.AutomationConditionText":{"type":"string","minLength":1,"maxLength":500},"Automations.AutomationFilePattern":{"type":"string","minLength":1},"Automations.AutomationId":{"type":"string","examples":["k3v8n2w6q9ts"]},"Automations.AutomationList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Automations.Automation"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Automations.AutomationListScope":{"type":"string","enum":["mine","all"]},"Automations.AutomationPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Automations.AutomationRepositoryId":{"type":"string","minLength":1,"description":"Repository id, or `auto` to let Inspect detect the repository. Must be a repository known to Inspect."},"Automations.AutomationRunAs":{"type":"string","enum":["owner","inspect"]},"Automations.AutomationSlackMention":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUser"},{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserGroup"}],"description":"Slack user or user group mentioned when the automation posts to Slack."},"Automations.AutomationSlackMentionInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserInput"},{"$ref":"#/components/schemas/Automations.AutomationSlackMentionUserGroupInput"}],"description":"Slack user (the default when `type` is omitted) or user group to mention."},"Automations.AutomationSlackMentionUser":{"type":"object","required":["type","id","name","avatar_url"],"properties":{"type":{"type":"string","enum":["user"]},"id":{"type":"string","examples":["U04QZ8K2M7N"]},"name":{"type":"string","examples":["Jane Doe"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["https://avatars.slack-edge.com/2024-03-12/6801234567890_3f9a1b2c4d5e6f708192_192.jpg"]}}},"Automations.AutomationSlackMentionUserGroup":{"type":"object","required":["type","id","name","handle"],"properties":{"type":{"type":"string","enum":["usergroup"]},"id":{"type":"string","examples":["S05B7RT3XLP"]},"name":{"type":"string","examples":["Web On-call"]},"handle":{"type":"string","examples":["web-oncall"]}}},"Automations.AutomationSlackMentionUserGroupInput":{"type":"object","required":["type","id","name","handle"],"properties":{"type":{"type":"string","enum":["usergroup"]},"id":{"type":"string","minLength":1,"examples":["S05B7RT3XLP"]},"name":{"type":"string","minLength":1,"examples":["Web On-call"]},"handle":{"type":"string","minLength":1,"examples":["web-oncall"]}}},"Automations.AutomationSlackMentionUserInput":{"type":"object","required":["id","name","avatar_url"],"properties":{"type":{"type":"string","enum":["user"],"examples":["user"],"default":"user"},"id":{"type":"string","minLength":1,"examples":["U04QZ8K2M7N"]},"name":{"type":"string","minLength":1,"examples":["Jane Doe"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["https://avatars.slack-edge.com/2024-03-12/6801234567890_3f9a1b2c4d5e6f708192_192.jpg"]}}},"Automations.AutomationTemplateVariableDefinition":{"type":"object","required":["label","value_type","default_value","options"],"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display label for this variable, or null when not set.","examples":["Service"]},"value_type":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableValueType","description":"Expected value shape for editor inputs. Prompt rendering still substitutes strings. Defaults to `text`.","examples":["text"]},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default substitution value, or null when not set.","examples":["web"]},"options":{"type":"array","items":{"type":"string"},"description":"Allowed substitution values shown as a picker. Empty when any value is accepted.","examples":[["web","api","worker"]]}}},"Automations.AutomationTemplateVariableDefinitionInput":{"type":"object","properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display label for this variable, or null when not set.","examples":["Service"]},"value_type":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableValueType","description":"Expected value shape for editor inputs. Prompt rendering still substitutes strings. Defaults to `text`.","examples":["text"]},"default_value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Default substitution value, or null when not set.","examples":["web"]},"options":{"type":"array","items":{"type":"string"},"description":"Allowed substitution values shown as a picker. Empty when any value is accepted.","examples":[["web","api","worker"]]}},"description":"The template for adding optional properties."},"Automations.AutomationTemplateVariableValueType":{"type":"string","enum":["text","integer","number","boolean"]},"Automations.AutomationTextOperator":{"type":"string","enum":["contains","not_contains","starts_with","ends_with","equals","not_equals"]},"Automations.AutomationTrigger":{"anyOf":[{"$ref":"#/components/schemas/Automations.CronAutomationTrigger"},{"$ref":"#/components/schemas/Automations.PushAutomationTrigger"},{"$ref":"#/components/schemas/Automations.StatusCheckAutomationTrigger"},{"$ref":"#/components/schemas/Automations.PrCommentAutomationTrigger"},{"$ref":"#/components/schemas/Automations.PullRequestAutomationTrigger"},{"$ref":"#/components/schemas/Automations.SentryAutomationTrigger"},{"$ref":"#/components/schemas/Automations.WebhookAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LinearAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LinearCommentAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LinearReleaseAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LinearProjectAutomationTrigger"},{"$ref":"#/components/schemas/Automations.InspectEventAutomationTrigger"},{"$ref":"#/components/schemas/Automations.SlackAutomationTrigger"},{"$ref":"#/components/schemas/Automations.DatadogAutomationTrigger"},{"$ref":"#/components/schemas/Automations.LaunchDarklyAutomationTrigger"}]},"Automations.AutomationTriggerInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.CronAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.PushAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.StatusCheckAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.PrCommentAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.PullRequestAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.SentryAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.WebhookAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LinearAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LinearCommentAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LinearReleaseAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LinearProjectAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.InspectEventAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.SlackAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.DatadogAutomationTriggerInput"},{"$ref":"#/components/schemas/Automations.LaunchDarklyAutomationTriggerInput"}],"description":"Trigger definition, selected by `type`."},"Automations.AutomationTriggerInputBase":{"type":"object","required":["id"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true}}},"Automations.AutomationUserId":{"type":"string","minLength":1},"Automations.CreateAutomationRequest":{"type":"object","required":["name","prompt","repositories","triggers"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Automation name","examples":["Triage failing CI on main"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"description":"Optional description. When omitted, a short plain-language description is generated from the prompt.","examples":["Investigates failing checks on main and opens a pull request with a fix."],"default":null},"prompt":{"type":"string","minLength":1,"maxLength":100000,"description":"Prompt template sent to the agent","examples":["Investigate the failing {{check_name}} check on main for the {{service}} service and open a pull request with a fix."]},"source_automation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional published automation ID to soft fork.","examples":[null],"default":null},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId"},"minItems":1,"description":"Repository IDs the automation targets","examples":[["web"]]},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTriggerInput"},"description":"Trigger definitions. Pass an empty array for manual-only. Any trigger type may appear multiple times."},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["C03KH3AGN2G"],"default":null},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start.","examples":[true],"default":true},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMentionInput"},"description":"Slack users and user groups to mention in automation posts.","default":[]},"notify_collaborators_on_merge":{"type":"boolean","description":"When true, automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available.","examples":[false],"default":false},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this.","examples":["owner"],"default":"owner"},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationUserId"},"description":"Users who can view and edit this automation from Automations. The owner is always included and ignored if passed here.","examples":[["Hn5tR2wQ8xKc4LpZ7mVb3YdJ9sFg6aEk"]],"default":[]},"model_id":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"type":"string"},{"type":"null"}],"description":"Model used by the automation. Must be one of the model ids from `GET /api/v2/models`. Defaults to the default automation model unless the selected custom agent defines its own model.","examples":["claude-opus-5-5"],"default":null},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["h2w9c4m7k1xz"],"default":null},"autofix_ci_failures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to the owner user setting and is stored explicitly.","examples":[true],"default":null},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput"},{"type":"null"}],"description":"Policy applied to sessions. Null snapshots the owner user setting when the automation is created.","default":null},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Ignored when triggers is empty for manual-only automations.","examples":[true],"default":true},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinitionInput"},"description":"Template variable definitions keyed by variable name.","examples":[{"service":{"label":"Service","value_type":"text","default_value":"web","options":["web","api","worker"]}}],"default":{}}},"description":"Creates an automation whose ordered trigger list may contain repeated trigger types."},"Automations.CronAutomationTrigger":{"type":"object","required":["id","type","schedule_expression","cron_expression","timezone","enabled"],"properties":{"id":{"type":"string","description":"Stable trigger identifier.","examples":["m4p7x2c9d5hf"]},"type":{"type":"string","enum":["cron"]},"schedule_expression":{"type":"string","description":"Human-readable or raw cron schedule expression","examples":["Every weekday at 9am"]},"cron_expression":{"type":"string","description":"Cron expression","examples":["0 9 * * 1-5"]},"timezone":{"type":"string","description":"IANA timezone","examples":["America/New_York"]},"enabled":{"type":"boolean","description":"Whether this trigger is enabled","examples":[true]}}},"Automations.CronAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["cron"]},"schedule_expression":{"type":"string","maxLength":200,"description":"Human-readable or raw cron schedule expression.","examples":["Every weekday at 9am"],"default":""},"cron_expression":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":100,"description":"Cron expression. Required: a missing, null, or empty value is rejected.","examples":["0 9 * * 1-5"],"default":null},"timezone":{"type":"string","description":"IANA timezone for cron triggers","examples":["America/New_York"],"default":"UTC"}}},"Automations.DatadogAutomationTrigger":{"type":"object","required":["id","type","enabled","monitor_url","scope","monitor_id","reply_to_slack_message","provisioning_status","provisioning_error"],"properties":{"id":{"type":"string","examples":["b4x9q2t6m8jr"]},"type":{"type":"string","enum":["datadog"]},"enabled":{"type":"boolean","examples":[true]},"monitor_url":{"type":"string","description":"Datadog monitor URL for a Datadog trigger.","examples":["https://app.datadoghq.com/monitors/148392017"]},"scope":{"$ref":"#/components/schemas/Automations.DatadogTriggerScope","description":"Datadog transitions that start this trigger.","examples":["alert"]},"monitor_id":{"type":"string","description":"Datadog monitor identifier.","examples":["148392017"]},"reply_to_slack_message":{"type":"boolean","description":"Whether automation responses should reuse the matching Datadog notification thread in the configured Slack channel.","examples":[true]},"provisioning_status":{"$ref":"#/components/schemas/Automations.DatadogTriggerProvisioningStatus","examples":["active"]},"provisioning_error":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]}}},"Automations.DatadogAutomationTriggerInput":{"type":"object","required":["id","type","monitor_url","scope"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["datadog"]},"monitor_url":{"$ref":"#/components/schemas/Automations.DatadogMonitorUrl","description":"Full Datadog monitor URL.","examples":["https://app.datadoghq.com/monitors/148392017"]},"scope":{"$ref":"#/components/schemas/Automations.DatadogTriggerScope","description":"Transitions that start the automation.","examples":["alert"]},"reply_to_slack_message":{"type":"boolean","description":"Reply in the matching Datadog notification thread when it appears in the configured Slack channel.","examples":[true],"default":true}}},"Automations.DatadogMonitorUrl":{"type":"string","minLength":1,"maxLength":2000},"Automations.DatadogTriggerProvisioningStatus":{"type":"string","enum":["pending","active","error","deprovisioning","deleted"]},"Automations.DatadogTriggerScope":{"type":"string","enum":["alert","warning","all"]},"Automations.GithubBranchPatternCondition":{"type":"object","required":["field","operator","patterns"],"properties":{"field":{"type":"string","enum":["head_branch","base_branch"],"description":"`head_branch` is the pull request's source branch; `base_branch` is the branch it merges into.","examples":["head_branch"]},"operator":{"type":"string","enum":["matches_any_of","matches_none_of"],"examples":["matches_any_of"]},"patterns":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationBranchPattern"},"minItems":1,"maxItems":50,"description":"Glob patterns matched against the branch name.","examples":[["dependabot/**","release/*"]]}}},"Automations.GithubLabelName":{"type":"string","minLength":1,"maxLength":100},"Automations.GithubPrCommentAuthorCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["author"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"GitHub logins, matched case-insensitively. Requests trim each login and strip a leading `@` before validating it as a GitHub username (optionally ending in `[bot]`).","examples":[["jane-acme","dependabot[bot]"]]}}},"Automations.GithubPrCommentAuthorTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["author_type"]},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["human","bot"],"examples":["human"]}}},"Automations.GithubPrCommentCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.GithubPrCommentTextCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentKindCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorTypeCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorCondition"}],"description":"A typed GitHub PR comment condition. Conditions on one trigger are ANDed."},"Automations.GithubPrCommentKind":{"type":"string","enum":["conversation","review_comment","review"]},"Automations.GithubPrCommentKindCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["comment_kind"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentKind"},"minItems":1,"maxItems":3,"examples":[["conversation","review_comment"]]}}},"Automations.GithubPrCommentTextCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["text"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["starts_with"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["/inspect"]}}},"Automations.GithubPullRequestCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorTypeCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorCondition"},{"$ref":"#/components/schemas/Automations.GithubBranchPatternCondition"},{"$ref":"#/components/schemas/Automations.GithubPullRequestFilesCondition"},{"$ref":"#/components/schemas/Automations.GithubPullRequestDraftCondition"},{"$ref":"#/components/schemas/Automations.GithubPullRequestLabelsCondition"},{"$ref":"#/components/schemas/Automations.GithubPullRequestTitleCondition"},{"$ref":"#/components/schemas/Automations.GithubPullRequestNumberCondition"}],"description":"A typed GitHub pull request condition. Conditions on one trigger are ANDed. `author` and `author_type` refer to the pull request author."},"Automations.GithubPullRequestDraftCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["draft"]},"operator":{"type":"string","enum":["equals"]},"value":{"type":"boolean","examples":[false]}}},"Automations.GithubPullRequestEvent":{"type":"string","enum":["opened","ready_for_review","reopened","synchronize","labeled","merged","closed","approved","changes_requested"]},"Automations.GithubPullRequestFilesCondition":{"type":"object","required":["field","operator","patterns"],"properties":{"field":{"type":"string","enum":["files"]},"operator":{"type":"string","enum":["matches_any_of","matches_none_of"],"examples":["matches_any_of"]},"patterns":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationBranchPattern"},"minItems":1,"maxItems":50,"description":"Glob patterns matched against changed file paths.","examples":[["src/billing/**"]]}},"description":"Matches the pull request's changed file paths. `matches_any_of` matches when any changed file matches a pattern; `matches_none_of` when no changed file does."},"Automations.GithubPullRequestLabelsCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["labels"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubLabelName"},"minItems":1,"maxItems":100,"description":"Label names, matched case-insensitively against the pull request's current labels.","examples":[["dependencies"]]}}},"Automations.GithubPullRequestNumber":{"type":"integer","format":"int32","minimum":1},"Automations.GithubPullRequestNumberCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["number"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPullRequestNumber"},"minItems":1,"maxItems":100,"description":"Pull request numbers, for following specific pull requests.","examples":[[123]]}}},"Automations.GithubPullRequestTitleCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["title"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["starts_with"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["chore(deps)"]}}},"Automations.GithubPushCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorTypeCondition"},{"$ref":"#/components/schemas/Automations.GithubPrCommentAuthorCondition"},{"$ref":"#/components/schemas/Automations.GithubPushPullRequestAuthorCondition"}]},"Automations.GithubPushPullRequestAuthorCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["pr_author"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_none_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"description":"GitHub logins, matched case-insensitively. Requests trim each login and strip a leading `@` before validating it as a GitHub username.","examples":[["jane-acme"]]}},"description":"A condition on the GitHub user who pushed. Conditions on one trigger are ANDed."},"Automations.GithubStatusCheckResult":{"type":"string","enum":["failure","error","timed_out","startup_failure","action_required","success","cancelled","neutral","skipped"]},"Automations.InspectEventAutomationTrigger":{"type":"object","required":["id","type","enabled","event","filters"],"properties":{"id":{"type":"string","examples":["a4k8m2x6v1qd"]},"type":{"type":"string","enum":["inspect_event"]},"enabled":{"type":"boolean","examples":[true]},"event":{"type":"string","description":"Inspect event that starts the automation.","examples":["repository.added"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Automations.InspectEventFilter"},"description":"All filters must match the event payload. Empty matches every occurrence of the event."}},"description":"Runs when the trigger's Inspect event happens, such as a repository being added or an automation changing. Events caused by an automation run's own sessions never trigger runs."},"Automations.InspectEventAutomationTriggerInput":{"type":"object","required":["id","type","event"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["inspect_event"]},"event":{"type":"string","description":"Inspect event that starts the automation, such as `repository.added` or `automation.updated`. The automation owner and the API key user must be able to read audit logs.","examples":["repository.added"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Automations.InspectEventFilterInput"},"maxItems":20,"description":"All filters must match the event payload. Empty matches every occurrence of the event.","default":[]}}},"Automations.InspectEventFilter":{"type":"object","required":["path","operator","value"],"properties":{"path":{"type":"string","minLength":1,"maxLength":256,"description":"Dot path into the event payload (array elements by index).","examples":["name"]},"operator":{"$ref":"#/components/schemas/Automations.WebhookFilterOperator","description":"Text operators are case-insensitive; `matches` is a case-insensitive regular expression. Array fields match when any element matches."},"value":{"type":"string","maxLength":500,"examples":["github"]}}},"Automations.InspectEventFilterInput":{"type":"object","required":["path","operator"],"properties":{"path":{"type":"string","minLength":1,"maxLength":256,"description":"Dot path into the event payload (array elements by index).","examples":["name"]},"operator":{"$ref":"#/components/schemas/Automations.WebhookFilterOperator","description":"Text operators are case-insensitive; `matches` is a case-insensitive regular expression. Array fields match when any element matches."},"value":{"type":"string","maxLength":500,"description":"Required except for `exists` and `not_exists`.","examples":["github"],"default":""}}},"Automations.LaunchDarklyAutomationTrigger":{"type":"object","required":["id","type","enabled","project_key","environment_key","conditions","provisioning_status","provisioning_error"],"properties":{"id":{"type":"string","examples":["l7g3w9c1v5nh"]},"type":{"type":"string","enum":["launchdarkly"]},"enabled":{"type":"boolean","examples":[true]},"project_key":{"type":"string","examples":["default"]},"environment_key":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["production"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LaunchDarklyCondition"}},"provisioning_status":{"$ref":"#/components/schemas/Automations.LaunchDarklyTriggerProvisioningStatus","examples":["active"]},"provisioning_error":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]}}},"Automations.LaunchDarklyAutomationTriggerInput":{"type":"object","required":["id","type","project_key","conditions"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["launchdarkly"]},"project_key":{"$ref":"#/components/schemas/Automations.LaunchDarklyProjectKey","examples":["default"]},"environment_key":{"anyOf":[{"$ref":"#/components/schemas/Automations.LaunchDarklyEnvironmentKey"},{"type":"null"}],"examples":["production"],"default":null},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LaunchDarklyCondition"},"maxItems":20}}},"Automations.LaunchDarklyCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"$ref":"#/components/schemas/Automations.LaunchDarklyConditionField","examples":["flag_key"]},"operator":{"$ref":"#/components/schemas/Automations.LaunchDarklyConditionOperator","examples":["starts_with"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["checkout-"]}}},"Automations.LaunchDarklyConditionField":{"type":"string","enum":["flag_key","action","member_email","comment"]},"Automations.LaunchDarklyConditionOperator":{"type":"string","enum":["equals","not_equals","contains","starts_with"]},"Automations.LaunchDarklyEnvironmentKey":{"type":"string","maxLength":256,"pattern":"^[a-zA-Z0-9_.-]*$"},"Automations.LaunchDarklyProjectKey":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[a-zA-Z0-9_.-]+$"},"Automations.LaunchDarklyTriggerProvisioningStatus":{"type":"string","enum":["pending","active","error","deleted"]},"Automations.LinearAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id","actions","conditions"],"properties":{"id":{"type":"string","examples":["n4r8c2x6k1vd"]},"type":{"type":"string","enum":["linear"]},"enabled":{"type":"boolean","examples":[true]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Linear installation id to accept issues from. Null accepts issues from every connected Linear workspace.","examples":["q3v8m1k6d2pa"]},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearIssueAction"},"description":"Linear issue events that start the automation.","examples":[["create","update"]]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearIssueCondition"},"description":"All conditions must match."}}},"Automations.LinearAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["linear"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Linear installation id to accept issues from. Omit or use null to accept issues from every connected Linear workspace.","examples":["q3v8m1k6d2pa"],"default":null},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearIssueAction"},"minItems":1,"maxItems":2,"description":"Linear issue events that start the automation.","examples":[["create"]],"default":["create"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearIssueCondition"},"maxItems":20,"description":"All conditions must match. When omitted, defaults to `[{ \"field\": \"actor_type\", \"operator\": \"equals\", \"value\": \"human\" }]` (changes made by people only).","default":[{"field":"actor_type","operator":"equals","value":"human"}]}}},"Automations.LinearCommentAuthorTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["author_type"],"description":"`human` is a comment written by a Linear user; apps, integrations, and deleted users are `bot`."},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["human","bot"],"examples":["human"]}}},"Automations.LinearCommentAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id","conditions"],"properties":{"id":{"type":"string","examples":["c7m2x9k4p1qa"]},"type":{"type":"string","enum":["linear_comment"]},"enabled":{"type":"boolean","examples":[true]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Linear installation id to accept comments from. Null accepts comments from every connected Linear workspace.","examples":["q3v8m1k6d2pa"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearCommentCondition"},"description":"All conditions must match."}},"description":"Runs when someone adds a comment to an issue in a Linear workspace connected through the Inspect Linear app. Edited and deleted comments, comments on non-issue entities, and comments written by Inspect never trigger runs."},"Automations.LinearCommentAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["linear_comment"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Linear installation id to accept comments from. Omit or use null to accept comments from every connected Linear workspace.","examples":["q3v8m1k6d2pa"],"default":null},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearCommentCondition"},"maxItems":20,"description":"All conditions must match. When omitted, defaults to `[{ \"field\": \"author_type\", \"operator\": \"equals\", \"value\": \"human\" }]` (comments written by people only).","default":[{"field":"author_type","operator":"equals","value":"human"}]}}},"Automations.LinearCommentBodyCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["body"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["contains"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["/triage"]}}},"Automations.LinearCommentCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.LinearCommentBodyCondition"},{"$ref":"#/components/schemas/Automations.LinearCommentTeamCondition"},{"$ref":"#/components/schemas/Automations.LinearCommentAuthorTypeCondition"}],"description":"A typed Linear comment condition. Conditions on one trigger are ANDed."},"Automations.LinearCommentTeamCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["team"],"description":"Matches the team key or name of the commented issue, case-insensitively."},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"examples":[["ENG"]]}}},"Automations.LinearIssueAction":{"type":"string","enum":["create","update"]},"Automations.LinearIssueActorTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["actor_type"]},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["human","bot"],"examples":["human"]}}},"Automations.LinearIssueChangeCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["state_changed_to","label_added"],"description":"Matches only issue updates: `state_changed_to` when the workflow state changed to one of the names, `label_added` when one of the named labels was added.","examples":["label_added"]},"operator":{"type":"string","enum":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"examples":[["inspect"]]}}},"Automations.LinearIssueCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.LinearIssueTextCondition"},{"$ref":"#/components/schemas/Automations.LinearIssueSetCondition"},{"$ref":"#/components/schemas/Automations.LinearIssueChangeCondition"},{"$ref":"#/components/schemas/Automations.LinearIssuePriorityCondition"},{"$ref":"#/components/schemas/Automations.LinearIssueActorTypeCondition"}],"description":"A typed Linear issue condition. Conditions on one trigger are ANDed."},"Automations.LinearIssuePriority":{"type":"string","enum":["urgent","high","medium","low","none"]},"Automations.LinearIssuePriorityCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["priority"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearIssuePriority"},"minItems":1,"maxItems":5,"examples":[["urgent","high"]]}}},"Automations.LinearIssueSetCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["team","project","state","label","assignee"],"description":"`team` matches the team key or name; `project`, `state`, and `label` match names; `assignee` matches the assignee email. All matches are case-insensitive.","examples":["label"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"examples":[["Bug"]]}}},"Automations.LinearIssueTextCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["title","description"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["contains"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["crash"]}}},"Automations.LinearProjectAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id","events","conditions"],"properties":{"id":{"type":"string","examples":["p6m3k9x2v1qa"]},"type":{"type":"string","enum":["linear_project"]},"enabled":{"type":"boolean","examples":[true]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Linear installation id to accept projects from. Null accepts projects from every connected Linear workspace.","examples":["q3v8m1k6d2pa"]},"events":{"type":"array","items":{"type":"string","enum":["create","status_change","health_change"]},"description":"Project events that start the automation.","examples":[["health_change"]]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearProjectCondition"},"description":"All conditions must match. They check the project state at the event."}},"description":"Runs when one of the trigger's project events (created, status changed, health changed) happens in a Linear workspace connected through the Inspect Linear app. Other project edits, archived or trashed projects, and changes made by Inspect never trigger runs."},"Automations.LinearProjectAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["linear_project"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Linear installation id to accept projects from. Omit or use null to accept projects from every connected Linear workspace.","examples":["q3v8m1k6d2pa"],"default":null},"events":{"type":"array","items":{"type":"string","enum":["create","status_change","health_change"]},"minItems":1,"maxItems":3,"description":"Project events that start the automation. When omitted, defaults to all three.","examples":[["health_change"]],"default":["create","status_change","health_change"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearProjectCondition"},"maxItems":20,"description":"All conditions must match. When omitted, every listed event matches.","default":[]}}},"Automations.LinearProjectCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.LinearProjectNameCondition"},{"$ref":"#/components/schemas/Automations.LinearProjectStatusTypeCondition"},{"$ref":"#/components/schemas/Automations.LinearProjectHealthCondition"}],"description":"A typed Linear project condition. Conditions on one trigger are ANDed."},"Automations.LinearProjectHealthCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["health"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string","enum":["on_track","at_risk","off_track"]},"minItems":1,"maxItems":3,"examples":[["at_risk","off_track"]]}}},"Automations.LinearProjectNameCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["status","lead"],"description":"`status` matches the project status name and `lead` the project lead's email, case-insensitively.","examples":["status"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"examples":[["In Progress"]]}}},"Automations.LinearProjectStatusTypeCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["status_type"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string","enum":["backlog","planned","started","paused","completed","canceled"]},"minItems":1,"maxItems":6,"examples":[["completed"]]}}},"Automations.LinearReleaseAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id","conditions"],"properties":{"id":{"type":"string","examples":["r5k2m8x1p4qa"]},"type":{"type":"string","enum":["linear_release"]},"enabled":{"type":"boolean","examples":[true]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Linear installation id to accept releases from. Null accepts releases from every connected Linear workspace.","examples":["q3v8m1k6d2pa"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearReleaseCondition"},"description":"All conditions must match."}},"description":"Runs when a release is created or moves to a new stage in a Linear workspace connected through the Inspect Linear app. Other release edits, archived or trashed releases, and changes made by Inspect never trigger runs."},"Automations.LinearReleaseAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["linear_release"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Linear installation id to accept releases from. Omit or use null to accept releases from every connected Linear workspace.","examples":["q3v8m1k6d2pa"],"default":null},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.LinearReleaseCondition"},"maxItems":20,"description":"All conditions must match. When omitted, every release creation and stage change matches.","default":[]}}},"Automations.LinearReleaseCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.LinearReleaseNameCondition"},{"$ref":"#/components/schemas/Automations.LinearReleaseStageTypeCondition"}],"description":"A typed Linear release condition. Conditions on one trigger are ANDed."},"Automations.LinearReleaseNameCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["pipeline","stage"],"description":"`pipeline` matches the release pipeline name and `stage` the release stage name, case-insensitively.","examples":["stage"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100,"examples":[["Production"]]}}},"Automations.LinearReleaseStageTypeCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["stage_type"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"type":"string","enum":["planned","started","completed","canceled"]},"minItems":1,"maxItems":4,"examples":[["completed"]]}}},"Automations.PrCommentAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","conditions"],"properties":{"id":{"type":"string","examples":["w6d1h8r4z2kp"]},"type":{"type":"string","enum":["pull_request_comment"]},"enabled":{"type":"boolean","examples":[true]},"watched_repository":{"type":"string","description":"Repository id of the watched repository.","examples":["web"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentCondition"},"description":"All conditions must match. Empty matches every new PR comment, including bot comments."}}},"Automations.PrCommentAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["pull_request_comment"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository.","examples":["web"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPrCommentCondition"},"maxItems":20,"description":"All conditions must match. Empty matches every new PR comment, including bot comments. When omitted, defaults to `[{ \"field\": \"author_type\", \"operator\": \"equals\", \"value\": \"human\" }]` (human-authored comments only).","default":[{"field":"author_type","operator":"equals","value":"human"}]}}},"Automations.PullRequestAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","events","conditions"],"properties":{"id":{"type":"string","examples":["p4k8n2v6x1tq"]},"type":{"type":"string","enum":["pull_request"]},"enabled":{"type":"boolean","examples":[true]},"watched_repository":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Repository id of the watched repository, or null to watch every repository known to Inspect.","examples":["web"]},"events":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPullRequestEvent"},"description":"Pull request events that start the automation.","examples":[["opened","ready_for_review"]]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPullRequestCondition"},"description":"All conditions must match."}}},"Automations.PullRequestAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["pull_request"]},"watched_repository":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationRepositoryId"},{"type":"null"}],"description":"Repository id of the watched repository. Omit or use null to watch every repository known to Inspect.","examples":["web"],"default":null},"events":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPullRequestEvent"},"minItems":1,"maxItems":9,"description":"Pull request events that start the automation.","examples":[["opened","ready_for_review"]],"default":["opened","ready_for_review"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPullRequestCondition"},"maxItems":20,"description":"All conditions must match. When omitted, defaults to `[{ \"field\": \"draft\", \"operator\": \"equals\", \"value\": false }]` (pull requests that are ready for review).","default":[{"field":"draft","operator":"equals","value":false}]}}},"Automations.PushAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","file_patterns","branch","conditions"],"properties":{"id":{"type":"string","description":"Stable trigger identifier.","examples":["t8b3n6k1w4ry"]},"type":{"type":"string","enum":["push"]},"enabled":{"type":"boolean","examples":[true]},"watched_repository":{"type":"string","description":"Repository id watched by a push trigger.","examples":["web"]},"file_patterns":{"type":"array","items":{"type":"string"},"description":"File globs matched by a push trigger.","examples":[["src/**/*.ts","package.json"]]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch name or glob pattern matched by a push trigger, or null for any branch.","examples":["main"]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPushCondition"},"description":"All conditions must match."}}},"Automations.PushAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository","file_patterns"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["push"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository.","examples":["web"]},"file_patterns":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationFilePattern"},"minItems":1,"description":"File globs matched against changed paths.","examples":[["src/**/*.ts","package.json"]]},"branch":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationBranchName"},{"type":"null"}],"description":"Optional branch name or glob pattern, such as `release/*`.","examples":["main"],"default":null},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubPushCondition"},"maxItems":20,"description":"All conditions must match. `author` and `author_type` refer to the GitHub user who pushed.","default":[]}}},"Automations.SentryAutomationTrigger":{"type":"object","required":["id","type","enabled","installation_id"],"properties":{"id":{"type":"string","examples":["f9s3m7b2x5ct"]},"type":{"type":"string","enum":["sentry"]},"enabled":{"type":"boolean","examples":[true]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Inspect Sentry organization id to accept alerts from. Null accepts alerts from every connected Sentry organization.","examples":["s6f2k9d4n8qa"]}}},"Automations.SentryAutomationTriggerInput":{"type":"object","required":["id","type"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["sentry"]},"installation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":64,"description":"Inspect Sentry organization id to accept alerts from. Omit or use null to accept alerts from every connected Sentry organization.","examples":["s6f2k9d4n8qa"],"default":null}}},"Automations.SlackAutomationCondition":{"anyOf":[{"$ref":"#/components/schemas/Automations.SlackChannelNameCondition"},{"$ref":"#/components/schemas/Automations.SlackTextCondition"},{"$ref":"#/components/schemas/Automations.SlackChannelTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadTsCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackMentionsCondition"},{"$ref":"#/components/schemas/Automations.SlackReactionCondition"},{"$ref":"#/components/schemas/Automations.SlackUserCondition"}],"description":"A typed Slack event condition. Conditions on one trigger are ANDed; values or entities inside one condition use the operator semantics."},"Automations.SlackAutomationConditionInput":{"anyOf":[{"$ref":"#/components/schemas/Automations.SlackChannelNameCondition"},{"$ref":"#/components/schemas/Automations.SlackTextCondition"},{"$ref":"#/components/schemas/Automations.SlackChannelTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadCondition"},{"$ref":"#/components/schemas/Automations.SlackThreadTsCondition"},{"$ref":"#/components/schemas/Automations.SlackSenderConditionInput"},{"$ref":"#/components/schemas/Automations.SlackSenderTypeCondition"},{"$ref":"#/components/schemas/Automations.SlackMentionsConditionInput"},{"$ref":"#/components/schemas/Automations.SlackReactionCondition"},{"$ref":"#/components/schemas/Automations.SlackUserConditionInput"}],"description":"A typed Slack event condition. Conditions on one trigger are ANDed; values or entities inside one condition use the operator semantics."},"Automations.SlackAutomationEntityRef":{"type":"object","required":["kind","id","aliases"],"properties":{"kind":{"type":"string","enum":["user","app"],"examples":["app"]},"id":{"$ref":"#/components/schemas/Automations.SlackEntityId","description":"Canonical Slack user, app, or bot id.","examples":["A07MPR3K9QX"]},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackEntityId"},"maxItems":10,"description":"Equivalent Slack identity ids accepted by this entity.","examples":[["B07MPR4L2ZA","U07MPR5N8WD"]]}},"description":"A Slack user or app identity. Aliases allow one app to match its app, bot, or bot-user ids. `user` ids start with U or W; `app` ids start with A or B."},"Automations.SlackAutomationEntityRefInput":{"type":"object","required":["kind","id"],"properties":{"kind":{"type":"string","enum":["user","app"],"examples":["app"]},"id":{"$ref":"#/components/schemas/Automations.SlackEntityId","description":"Canonical Slack user, app, or bot id.","examples":["A07MPR3K9QX"]},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackEntityId"},"maxItems":10,"description":"Equivalent Slack identity ids accepted by this entity.","examples":[["B07MPR4L2ZA","U07MPR5N8WD"]]}},"description":"A Slack user or app identity. Aliases allow one app to match its app, bot, or bot-user ids. `user` ids start with U or W; `app` ids start with A or B."},"Automations.SlackAutomationEvent":{"type":"string","enum":["message","reaction_added"]},"Automations.SlackAutomationTrigger":{"type":"object","required":["id","type","enabled","event","channel_ids","conditions"],"properties":{"id":{"type":"string","examples":["y1n5k8p3g7wd"]},"type":{"type":"string","enum":["slack"]},"enabled":{"type":"boolean","examples":[true]},"event":{"$ref":"#/components/schemas/Automations.SlackAutomationEvent","description":"Slack event type matched by a Slack trigger.","examples":["message"]},"channel_ids":{"type":"array","items":{"type":"string"},"description":"Slack channel ids watched by a Slack trigger.","examples":[["C03KH3AGN2G"]]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationCondition"},"description":"Conditions matched by a Slack trigger. Message and reaction events support different condition fields."}}},"Automations.SlackAutomationTriggerInput":{"type":"object","required":["id","type","event","channel_ids","conditions"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["slack"]},"event":{"$ref":"#/components/schemas/Automations.SlackAutomationEvent","description":"Slack event type to match.","examples":["message"]},"channel_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackChannelId"},"maxItems":100,"description":"Slack channel ids to watch. May be empty when a `channel_name` condition with `contains`, `starts_with`, `ends_with`, or `equals` narrows the channels.","examples":[["C03KH3AGN2G"]]},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationConditionInput"},"maxItems":20,"description":"Every condition must be valid for the selected event."}}},"Automations.SlackChannelId":{"type":"string","pattern":"^[CGcg][A-Za-z0-9]{8,}$"},"Automations.SlackChannelNameCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["channel_name"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["starts_with"]},"value":{"$ref":"#/components/schemas/Automations.SlackChannelNameText","examples":["incident-"]}},"description":"Matches the Slack channel name without the leading #. Name filters only see channels Inspect has already joined."},"Automations.SlackChannelNameText":{"type":"string","minLength":1,"maxLength":80},"Automations.SlackChannelTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["channel_type"]},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["code_channel"],"examples":["code_channel"]}},"description":"Matches Inspect Code Channels, the per-session channels Inspect creates and belongs to. `equals` counts as the trigger's channel filter."},"Automations.SlackEntityId":{"type":"string","pattern":"^[ABUWabuw][A-Za-z0-9]{8,}$"},"Automations.SlackMentionsCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["mentions"]},"operator":{"type":"string","enum":["includes_any","includes_all","includes_none"],"examples":["includes_any"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackMentionsConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["mentions"]},"operator":{"type":"string","enum":["includes_any","includes_all","includes_none"],"examples":["includes_any"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.SlackMessageTs":{"type":"string","pattern":"^\\d{9,}\\.\\d{6}$"},"Automations.SlackReactionCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["reaction"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackReactionName"},"minItems":1,"maxItems":100,"examples":[["eyes","rotating_light"]]}}},"Automations.SlackReactionName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^:?[a-zA-Z0-9_+-]+:?$"},"Automations.SlackSenderCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["sender"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackSenderConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["sender"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.SlackSenderTypeCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["sender_type"]},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["human","bot"],"examples":["human"]}}},"Automations.SlackTextCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["text"]},"operator":{"$ref":"#/components/schemas/Automations.AutomationTextOperator","examples":["contains"]},"value":{"$ref":"#/components/schemas/Automations.AutomationConditionText","examples":["deploy failed"]}}},"Automations.SlackThreadCondition":{"type":"object","required":["field","operator","value"],"properties":{"field":{"type":"string","enum":["thread"]},"operator":{"type":"string","enum":["equals","not_equals"],"examples":["equals"]},"value":{"type":"string","enum":["reply","top_level"],"examples":["top_level"]}}},"Automations.SlackThreadTsCondition":{"type":"object","required":["field","operator","values"],"properties":{"field":{"type":"string","enum":["thread_ts"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackMessageTs"},"minItems":1,"maxItems":100,"description":"Parent message timestamps of the threads.","examples":[["1755191113.000123"]]}},"description":"Matches messages in the listed threads: replies to each parent message, and the parent message itself. Message events only."},"Automations.SlackUserCondition":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["user"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRef"},"minItems":1,"maxItems":100}}},"Automations.SlackUserConditionInput":{"type":"object","required":["field","operator","entities"],"properties":{"field":{"type":"string","enum":["user"]},"operator":{"type":"string","enum":["is_any_of","is_none_of"],"examples":["is_any_of"]},"entities":{"type":"array","items":{"$ref":"#/components/schemas/Automations.SlackAutomationEntityRefInput"},"minItems":1,"maxItems":100}}},"Automations.StatusCheckAutomationTrigger":{"type":"object","required":["id","type","enabled","watched_repository","branch","check_names","results"],"properties":{"id":{"type":"string","examples":["c2q7v5j9n3lb"]},"type":{"type":"string","enum":["status_check"]},"enabled":{"type":"boolean","examples":[true]},"watched_repository":{"type":"string","description":"Repository id of the watched repository.","examples":["web"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact branch to watch, or null for any branch.","examples":["main"]},"check_names":{"type":"array","items":{"type":"string"},"description":"Check names to match. Empty matches every check.","examples":[["build","test"]]},"results":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubStatusCheckResult"},"description":"Check results that start the automation.","examples":[["failure","timed_out"]]}}},"Automations.StatusCheckAutomationTriggerInput":{"type":"object","required":["id","type","watched_repository","results"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["status_check"]},"watched_repository":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId","description":"Repository id of the watched repository.","examples":["web"]},"branch":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutomationBranchName"},{"type":"null"}],"description":"Optional exact branch name.","examples":["main"],"default":null},"check_names":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationCheckName"},"maxItems":50,"description":"Check names to match. Empty matches every check.","examples":[["build","test"]],"default":[]},"results":{"type":"array","items":{"$ref":"#/components/schemas/Automations.GithubStatusCheckResult"},"minItems":1,"description":"Check results that start the automation.","examples":[["failure","timed_out"]]}}},"Automations.TriggerAutomationRequest":{"type":"object","properties":{"variables":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Template variable overrides (string values only)","examples":[{"service":"api","check_name":"test"}]}}},"Automations.UpdateAutomationRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"examples":["Triage failing CI on main"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":500,"examples":["Investigates failing checks on main and opens a pull request with a fix."]},"prompt":{"type":"string","minLength":1,"maxLength":100000,"examples":["Investigate the failing {{check_name}} check on main for the {{service}} service and open a pull request with a fix."]},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationRepositoryId"},"minItems":1,"examples":[["web"]]},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationTriggerInput"},"description":"Replacement trigger definitions. Pass an empty array for manual-only. Preserve ids for retained triggers; any trigger type may appear multiple times."},"slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["C03KH3AGN2G"]},"post_to_slack_on_start":{"type":"boolean","description":"Whether automation sessions post to Slack when they start.","examples":[true]},"slack_mention_users":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationSlackMentionInput"},"description":"Replacement list of Slack users and user groups to mention in automation posts."},"notify_collaborators_on_merge":{"type":"boolean","description":"When true, automation-created PR merges ping the automation owner and collaborators in the Slack thread, or a group DM when no thread is available.","examples":[false]},"run_as":{"$ref":"#/components/schemas/Automations.AutomationRunAs","description":"Identity automation sessions run as: `owner` (the automation owner) or `inspect` (the Inspect system user). Only the owner can change this.","examples":["owner"]},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Automations.AutomationUserId"},"description":"Replacement collaborator list. Collaborators can view and edit this automation from Automations. The owner is always included and ignored if passed here.","examples":[["Hn5tR2wQ8xKc4LpZ7mVb3YdJ9sFg6aEk"]]},"model_id":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"type":"string"},{"type":"null"}],"description":"Must be one of the model ids from `GET /api/v2/models`.","examples":["claude-opus-5-5"]},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["h2w9c4m7k1xz"]},"autofix_ci_failures":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Null resolves to the owner user setting and is stored explicitly.","examples":[true]},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput"},{"type":"null"}],"description":"Policy applied to sessions. Null restores fallback to the owner user setting."},"enabled":{"type":"boolean","description":"Whether automatic triggers are active. Ignored when the automation is manual-only.","examples":[true]},"template_variables":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Automations.AutomationTemplateVariableDefinitionInput"},"description":"Template variable definitions keyed by variable name.","examples":[{"service":{"label":"Service","value_type":"text","default_value":"web","options":["web","api","worker"]}}]}},"description":"Updates an automation. Only provided fields are changed. The triggers field replaces the ordered list; preserve ids for retained triggers."},"Automations.WebhookAutomationTrigger":{"type":"object","required":["id","type","enabled","webhook_id","filters","filter_rule","filter_prompt"],"properties":{"id":{"type":"string","examples":["w4n8c2k6r1pz"]},"type":{"type":"string","enum":["webhook"]},"enabled":{"type":"boolean","examples":[true]},"webhook_id":{"type":"string","description":"Inbound webhook whose deliveries this trigger receives.","examples":["w4n8c2k6r1pz"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Automations.WebhookFilter"},"description":"All filters must match. Empty accepts every verified delivery."},"filter_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JavaScript module whose default export receives `{ body, headers }` (without the verification header or other credential headers) and returns a boolean or `{ match, reason }`. Runs after `filters`, in an isolated sandbox; failures never start a run."},"filter_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The natural-language request `filter_rule` was written from."}}},"Automations.WebhookAutomationTriggerInput":{"type":"object","required":["id","type","webhook_id"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Trigger identity. Pass null to add a new trigger, or the id of an existing trigger on this automation to keep it; unknown ids are rejected. Must be null when creating an automation.","examples":[null]},"enabled":{"type":"boolean","examples":[true],"default":true},"type":{"type":"string","enum":["webhook"]},"webhook_id":{"type":"string","maxLength":64,"description":"Inbound webhook whose deliveries this trigger receives. Create webhooks in Customize > Webhooks.","examples":["w4n8c2k6r1pz"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Automations.WebhookFilterInput"},"maxItems":20,"description":"All filters must match. Empty accepts every verified delivery.","default":[]},"filter_rule":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":20000,"description":"JavaScript module whose default export receives `{ body, headers }` (lowercased header names, without the verification header or other credential headers) and returns a boolean or `{ match, reason }`. Runs after `filters` in an isolated sandbox with no network access; throwing or timing out never starts a run.","default":null},"filter_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"The natural-language request `filter_rule` was written from, kept for display and regeneration.","default":null}}},"Automations.WebhookFieldSource":{"type":"string","enum":["body","header"]},"Automations.WebhookFilter":{"type":"object","required":["source","path","operator","value"],"properties":{"source":{"$ref":"#/components/schemas/Automations.WebhookFieldSource"},"path":{"type":"string","minLength":1,"maxLength":256,"description":"Dot path into the JSON body (array elements by index), or a header name. The verification header and credential headers can't be filtered on.","examples":["event_type"]},"operator":{"$ref":"#/components/schemas/Automations.WebhookFilterOperator","description":"Text operators are case-insensitive; `matches` is a case-insensitive regular expression. Array fields match when any element matches."},"value":{"type":"string","maxLength":500,"examples":["report.created"]}}},"Automations.WebhookFilterInput":{"type":"object","required":["path","operator"],"properties":{"source":{"$ref":"#/components/schemas/Automations.WebhookFieldSource","default":"body"},"path":{"type":"string","minLength":1,"maxLength":256,"description":"Dot path into the JSON body (array elements by index), or a header name. The verification header and credential headers can't be filtered on.","examples":["event_type"]},"operator":{"$ref":"#/components/schemas/Automations.WebhookFilterOperator","description":"Text operators are case-insensitive; `matches` is a case-insensitive regular expression. Array fields match when any element matches."},"value":{"type":"string","maxLength":500,"examples":["report.created"],"default":""}}},"Automations.WebhookFilterOperator":{"type":"string","enum":["contains","not_contains","starts_with","ends_with","equals","not_equals","matches","exists","not_exists"]},"BaseCommitRequiredError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["base_commit_required"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"CallbackUrlNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["callback_url_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ConcurrentSessionLimitError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["concurrent_session_limit"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"DailySessionLimitError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["daily_session_limit"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Deployments.DeploymentReport":{"type":"object","required":["github_repository","pull_request_numbers"],"properties":{"github_repository":{"type":"string","description":"Lowercased `owner/repo`.","examples":["acme/web"]},"pull_request_numbers":{"type":"array","items":{"$ref":"#/components/schemas/Deployments.PullRequestNumber"},"examples":[[1234,1236]]}}},"Deployments.DeploymentStatus":{"type":"string","enum":["deployed","failed"]},"Deployments.PullRequestDeployment":{"type":"object","required":["environment","status","url","commit_sha","last_succeeded_at","error","occurred_at"],"properties":{"environment":{"type":"string","description":"Environment name","examples":["production"]},"status":{"$ref":"#/components/schemas/Deployments.PullRequestDeploymentStatus","description":"Most recently reported status","examples":["deployed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Last successfully deployed URL, kept while a newer deploy is in progress or has failed","examples":["https://acme.com"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit of the last successful deploy","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the environment last deployed successfully","examples":["2026-10-28T15:42:11.204Z"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure details for a failed status","examples":[null]},"occurred_at":{"type":"string","format":"date-time","description":"When the most recently reported status occurred","examples":["2026-10-28T15:42:11.204Z"]}}},"Deployments.PullRequestDeploymentList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deployments.PullRequestDeployment"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Deployments.PullRequestDeploymentStatus":{"type":"string","enum":["deploying","deployed","failed"]},"Deployments.PullRequestNumber":{"type":"integer","format":"int64","exclusiveMinimum":0,"examples":[1234]},"Deployments.ReportDeploymentRequest":{"type":"object","required":["pull_request_numbers","status"],"properties":{"pull_request_numbers":{"type":"array","items":{"$ref":"#/components/schemas/Deployments.PullRequestNumber"},"minItems":1,"maxItems":500,"description":"Pull requests the deployment applies to. Values must be unique.","examples":[[1234,1236]],"uniqueItems":true},"status":{"$ref":"#/components/schemas/Deployments.DeploymentStatus","examples":["deployed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Deployed URL (http or https), shown on the pull request.","examples":["https://acme.com"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit that was deployed.","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"environment":{"type":"string","minLength":1,"maxLength":200,"description":"Optional caller-defined environment, shown in notifications and never a completion gate. Omission uses the storage key `default`.","examples":["production"]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Optional deployment failure details.","examples":["Health check failed for web-7f9c4d after 3 attempts."]},"occurred_at":{"type":"string","format":"date-time","description":"When the deployment transition occurred. Defaults to receipt time.","examples":["2026-10-28T15:42:11.204Z"]}},"description":"Unknown properties are rejected.","additionalProperties":false},"Deployments.RepositoryNamePathSegment":{"type":"string","pattern":"^[^/\\s]+$","examples":["web"]},"Deployments.RepositoryOwnerPathSegment":{"type":"string","pattern":"^[^/\\s]+$","examples":["acme"]},"Deployments.RepositoryPathSegment":{"type":"string","pattern":"^[^/\\s]+$"},"DiffNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["diff_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Error":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Machine-readable error code, for example `session_not_found`. Null when the error has no specific code.","examples":["session_not_found"]}}},"GithubAccountRequiredError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["github_account_required"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"GithubAppNotConnectedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["github_app_not_connected"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ImpersonationNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["impersonation_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InternalError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["internal_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidArtifactUrlError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_artifact_url"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidAutomationError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_automation"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidBaseBranchError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_base_branch"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidCursorError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_cursor"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidIdempotencyKeyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_idempotency_key"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidModelError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_model"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidModelVariantError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_model_variant"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidRepositoryError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_repository"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidRequestBodyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_request_body"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidServiceTierError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_service_tier"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidSkillError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_skill"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidSlackThreadError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_slack_thread"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"InvalidVisibilityError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["invalid_visibility"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"MalformedJsonError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["malformed_json"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Memories.ArchiveMemoryRequest":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/Memories.MemoryArchiveReason","examples":["Superseded by the repository formatting guide."]}}},"Memories.CreateMemoryRequest":{"type":"object","required":["title","content","description","memory_type","scope"],"properties":{"title":{"$ref":"#/components/schemas/Memories.MemoryTitle","examples":["Run oxfmt before committing"]},"content":{"$ref":"#/components/schemas/Memories.MemoryContent","description":"Canonical Markdown body. Directive memories must be at most 2000 characters so they can be injected in full.","examples":["Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository."]},"description":{"$ref":"#/components/schemas/Memories.MemoryDescription","examples":["Use oxfmt, not prettier, to format files before committing in acme/web."]},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType","examples":["directive"]},"scope":{"$ref":"#/components/schemas/Memories.MemoryScopeType","examples":["personal"]},"scope_id":{"$ref":"#/components/schemas/Memories.MemoryUserId","description":"Not supported for personal memories. Any value is rejected with 400."}}},"Memories.CreatedMemory":{"type":"object","required":["memory","scope"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"},"scope":{"$ref":"#/components/schemas/Memories.MemoryScope"}}},"Memories.Memory":{"type":"object","required":["id","title","content","description","memory_type","archived_at","archived_reason"],"properties":{"id":{"type":"string","examples":["Kq8vN2xLm4pR7tYc3hWzA"]},"title":{"type":"string","examples":["Run oxfmt before committing"]},"content":{"type":"string","description":"Canonical Markdown body.","examples":["Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository."]},"description":{"type":"string","description":"Standalone discovery summary.","examples":["Use oxfmt, not prettier, to format files before committing in acme/web."]},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType","examples":["directive"]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"archived_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]}}},"Memories.MemoryArchiveReason":{"type":"string","minLength":1,"maxLength":500},"Memories.MemoryCatalogEntry":{"type":"object","required":["id","title","description","content","memory_type","updated_at","scope"],"properties":{"id":{"type":"string","examples":["Kq8vN2xLm4pR7tYc3hWzA"]},"title":{"type":"string","examples":["Run oxfmt before committing"]},"description":{"type":"string","description":"Standalone discovery summary.","examples":["Use oxfmt, not prettier, to format files before committing in acme/web."]},"content":{"type":"string","description":"Canonical Markdown body.","examples":["Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository."]},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType","examples":["directive"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"scope":{"$ref":"#/components/schemas/Memories.MemoryScope"}}},"Memories.MemoryContent":{"type":"string","minLength":1,"maxLength":20000},"Memories.MemoryContext":{"type":"object","required":["scopes","directives","facts"],"properties":{"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryScope"},"description":"Scopes the returned memories were read from."},"directives":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Always-on behavioral directives that apply in the requested scopes."},"facts":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Fact memories available for discovery in the requested scopes."}}},"Memories.MemoryDescription":{"type":"string","minLength":10,"maxLength":420},"Memories.MemoryDetails":{"type":"object","required":["memory","scopes"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryScope"}}}},"Memories.MemoryDirectiveLimit":{"type":"integer","format":"int32","minimum":1,"maximum":25},"Memories.MemoryFactLimit":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Memories.MemoryId":{"type":"string","examples":["Kq8vN2xLm4pR7tYc3hWzA"]},"Memories.MemoryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Memories.MemoryCatalogEntry"},"description":"Directives first, then facts, each most recently updated first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Memories.MemoryResult":{"type":"object","required":["memory"],"properties":{"memory":{"$ref":"#/components/schemas/Memories.Memory"}}},"Memories.MemoryScope":{"type":"object","required":["type","id"],"properties":{"type":{"$ref":"#/components/schemas/Memories.MemoryScopeType","examples":["personal"]},"id":{"type":"string","description":"User id.","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]}}},"Memories.MemoryScopeType":{"type":"string","enum":["personal"]},"Memories.MemoryTitle":{"type":"string","minLength":1,"maxLength":200},"Memories.MemoryType":{"type":"string","enum":["fact","directive"]},"Memories.MemoryUserId":{"type":"string","minLength":1,"examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"Memories.UpdateMemoryRequest":{"type":"object","required":["title","content","description","memory_type"],"properties":{"title":{"$ref":"#/components/schemas/Memories.MemoryTitle","examples":["Run oxfmt before committing"]},"content":{"$ref":"#/components/schemas/Memories.MemoryContent","description":"Canonical Markdown body. Directive memories must be at most 2000 characters so they can be injected in full.","examples":["Format changed files with `bun oxfmt` before every commit. Do not use prettier in this repository."]},"description":{"$ref":"#/components/schemas/Memories.MemoryDescription","examples":["Use oxfmt, not prettier, to format files before committing in acme/web."]},"memory_type":{"$ref":"#/components/schemas/Memories.MemoryType","examples":["directive"]}}},"MemoryArchivedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["memory_archived"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"MemoryDirectiveTooLongError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["memory_directive_too_long"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"MemoryNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["memory_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"MemoryUserNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["user_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"MemoryValidationFailedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["validation_failed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Models.Model":{"type":"object","required":["id","name","description","aliases","supported_variants","visibility"],"properties":{"id":{"type":"string","examples":["claude-opus-5-5"]},"name":{"type":"string","examples":["Claude Opus 5.5"]},"description":{"type":"string","examples":["Claude model for long-running agentic coding and knowledge work"]},"aliases":{"type":"array","items":{"type":"string"},"description":"Stable shorthand aliases that resolve to this model.","examples":[["opus"]]},"supported_variants":{"type":"array","items":{"$ref":"#/components/schemas/Models.ModelVariant"},"description":"Reasoning variants accepted for this model. Empty when the model does not support configurable reasoning.","examples":[["low","medium","high","xhigh","max"]]},"visibility":{"$ref":"#/components/schemas/Models.ModelVisibility","description":"Whether the model is shown in model pickers: visible to everyone, hidden from everyone, or eap (shown only to early-access users).","examples":["visible"]}}},"Models.ModelAlias":{"type":"string","enum":["opus","sonnet","haiku","fable","gemini","gemini-pro","gemini-flash","gemini-flash-lite","gemini-3.5-flash","gpt","gpt-6","astra","gpt-5","balanced","frontier","sol","terra","luna","codex","grok","kimi","glm","glm-fast","minimax","qwen","deepseek","muse-wonder","muse-spark"],"description":"Stable shorthand aliases that resolve to a model ID."},"Models.ModelId":{"type":"string","enum":["claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-opus-4-5-20251101","claude-sonnet-5-5","claude-sonnet-5","claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-haiku-5-5","claude-haiku-4-5-20251001","claude-fable-5-2","claude-fable-5-1","claude-fable-5","gpt-6.2-astra","gpt-6-astra","gpt-6.2-sol","gpt-6.1-sol","gpt-6.1-terra","gpt-6-sol","gpt-6-luna","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-5.5","gpt-5.4","gpt-5.3-codex-api-preview","gpt-5.3-codex","gpt-5.3-codex-spark","gpt-5.4-mini","gpt-5.4-nano","gpt-5.2-codex-medium","gpt-5.2-codex-high","gpt-5.2-codex-xhigh","gpt-5.2-medium","gpt-5.2-high","gpt-5.2-xhigh","gpt-5.2-pro-high","gemini-4-argon","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-pro-preview","gemini-3-flash-preview","gemini-3.5-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-flash-early-exp2","gemini-pro-early-exp","grok-4.7","grok-4.5","grok-code-fast-1","zai-glm-4.7","zai-glm-4.6","moonshotai/kimi-k2-instruct-0905","accounts/fireworks/models/kimi-k3","accounts/fireworks/routers/kimi-k3-fast","kimi-k2p7-code","kimi-k2p7-code-fast","kimi-k2p6","kimi-k2p6-turbo","accounts/fireworks/routers/kimi-k2p5-turbo","accounts/fireworks/routers/glm-5-fast","glm-5p3","accounts/fireworks/models/glm-5p2","accounts/fireworks/routers/glm-5p2-fast","accounts/fireworks/routers/glm-5p1-fast","minimax-m3","accounts/fireworks/models/minimax-m2p5","qwen3p8-max","accounts/fireworks/models/qwen3p6-plus","deepseek-v4.1-flash-1017","accounts/fireworks/models/deepseek-v4-flash-0731","accounts/fireworks/models/deepseek-v4-pro","kimi-k3-modal","muse-wonder-1.0","muse-spark-1.3"],"description":"Model IDs known to Inspect."},"Models.ModelList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Models.Model"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Models.ModelVariant":{"type":"string","enum":["low","medium","high","xhigh","max","minimal","none"]},"Models.ModelVisibility":{"type":"string","enum":["visible","hidden","eap"]},"NoModelsAvailableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["no_models_available"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"NoOperateSessionError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["no_operate_session"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"NotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Operate.OperateDigest":{"type":"object","required":["id","title","body","source_session_id","created_at"],"properties":{"id":{"type":"string","examples":["m8q3t6v1z4ke"]},"title":{"type":"string","examples":["Thursday digest"]},"body":{"type":"string","description":"Markdown.","examples":["## Needs you\n- [acme/web#4182](https://github.com/acme/web/pull/4182) is waiting on your review.\n\n## Done\n- [acme/api#977](https://github.com/acme/api/pull/977) merged and deployed to production."]},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["k3v8n1q6w2tb"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]}}},"Operate.OperateDigestList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateDigest"},"description":"Newest first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateHomeSession":{"type":"object","required":["session_id"],"properties":{"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The home session id, or null when the user has none. Read its messages with the Sessions operations.","examples":["k3v8n1q6w2tb"]}},"description":"The API key user's active Operate home session."},"Operate.OperateJournalEntry":{"type":"object","required":["task_key","title","body","source_session_id","created_at","updated_at","expires_at"],"properties":{"task_key":{"type":"string","description":"The task key, for example a pull request URL.","examples":["https://github.com/acme/web/pull/4182"]},"title":{"type":"string","examples":["Post-merge check: acme/web#4182"]},"body":{"type":"string","description":"Markdown.","examples":["Deployed to production at 15:30 UTC. Checkout error rate is flat and no new Sentry issues."]},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["k3v8n1q6w2tb"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-29T13:05:47.912Z"]},"expires_at":{"type":"string","format":"date-time","description":"30 days after the last write. Expired entries are not returned.","examples":["2026-11-28T13:05:47.912Z"]}},"description":"The outcome of Operate's background work, such as a post-merge check. Each task key has one entry."},"Operate.OperateJournalEntryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateJournalEntry"},"description":"Most recently written first."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateMemoryAuthor":{"type":"string","enum":["agent","extract","dream"],"description":"Who wrote a memory file version."},"Operate.OperateMemoryFile":{"type":"object","required":["path","kind","version","contents","author","session_id"],"properties":{"path":{"type":"string","examples":["memory/deploy-windows.md"]},"kind":{"$ref":"#/components/schemas/Operate.OperateMemoryFileKind","examples":["memory"]},"version":{"type":"integer","format":"int32","examples":[3]},"contents":{"type":"string","description":"The latest version's contents. Memories start with `---` front matter (status, source, dates).","examples":["---\nstatus: confirmed\nsource: \"Owner said so in Slack\"\ncreated: 2026-10-21T14:08:33.517Z\nupdated: 2026-10-28T15:42:11.204Z\norigin_session: k3v8n1q6w2tb\n---\n\nNo production deploys of acme/web on Fridays after 14:00 Eastern.\n"]},"author":{"anyOf":[{"$ref":"#/components/schemas/Operate.OperateMemoryAuthor"},{"type":"null"}],"description":"Who wrote the latest version: `agent` (Operate's memory tools), `extract` (Inspect's background memory extraction), or `dream` (Inspect's background memory consolidation). Null when unknown, such as for older versions.","examples":["agent"]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session that wrote the latest version, when known.","examples":["k3v8n1q6w2tb"]}}},"Operate.OperateMemoryFileKind":{"type":"string","enum":["soul","memory","other"],"description":"`soul` is `SOUL.md`, `memory` is `memory/<slug>.md`, and `other` is any other file."},"Operate.OperateMemoryFileList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateMemoryFileSummary"},"description":"`SOUL.md` first, then memories and other files by path. Deleted memories are left out."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateMemoryFileSummary":{"type":"object","required":["path","kind","version","updated_at","author","session_id"],"properties":{"path":{"type":"string","examples":["memory/deploy-windows.md"]},"kind":{"$ref":"#/components/schemas/Operate.OperateMemoryFileKind","examples":["memory"]},"version":{"type":"integer","format":"int32","examples":[3]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-10-28T15:42:11.204Z"]},"author":{"anyOf":[{"$ref":"#/components/schemas/Operate.OperateMemoryAuthor"},{"type":"null"}],"description":"Who wrote the latest version: `agent` (Operate's memory tools), `extract` (Inspect's background memory extraction), or `dream` (Inspect's background memory consolidation). Null when unknown, such as for older versions.","examples":["agent"]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session that wrote the latest version, when known.","examples":["k3v8n1q6w2tb"]}},"description":"A file in the user's Operate memory, without its contents."},"Operate.OperateMessageDelivery":{"type":"object","required":["delivered"],"properties":{"delivered":{"type":"boolean","description":"False when this caller already sent the same message in the last 7 days, so it was not delivered again.","examples":[true]}}},"Operate.OperatePin":{"type":"object","required":["id","kind","title","url","body","topic","source_session_id","created_at","updated_at"],"properties":{"id":{"type":"string","examples":["b4n7r2x9c5hd"]},"kind":{"$ref":"#/components/schemas/Operate.OperatePinKind","examples":["link"]},"title":{"type":"string","examples":["Checkout redesign PR"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["https://github.com/acme/web/pull/4182"]},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Waiting on design review before merging."]},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Checkout"]},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["k3v8n1q6w2tb"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-29T13:05:47.912Z"]}},"description":"A link or note that Operate pinned on the Operate page."},"Operate.OperatePinKind":{"type":"string","enum":["link","note"]},"Operate.OperatePinList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperatePin"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateSchedule":{"type":"object","required":["id","name","cron_expression","timezone","prompt","enabled","next_run_at","last_run_at"],"properties":{"id":{"type":"string","examples":["s2w9e5j7p3ua"]},"name":{"type":"string","examples":["digest"]},"cron_expression":{"type":"string","examples":["0 9 * * 1-5"]},"timezone":{"type":"string","examples":["America/New_York"]},"prompt":{"type":"string","examples":["Write your owner's digest and publish it with `publish_operate_digest`."]},"enabled":{"type":"boolean","examples":[true]},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-10-30T13:00:00.000Z"]},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-10-29T13:00:00.000Z"]}},"description":"A recurring wake of the home session that Operate manages, such as the digest."},"Operate.OperateScheduleList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateSchedule"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateThread":{"type":"object","required":["thread_id","title","status","archived","created_at"],"properties":{"thread_id":{"type":"string","examples":["r6y1c8f3n5gw"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Checkout retries context for acme/web#4182"]},"status":{"$ref":"#/components/schemas/Operate.OperateWorkStatus","examples":["pending"]},"archived":{"type":"boolean","examples":[false]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]}},"description":"A dedicated Operate thread for bidirectional communication with Operate."},"Operate.OperateThreadDetail":{"type":"object","required":["thread_id","title","status","archived","created_at","messages"],"properties":{"thread_id":{"type":"string","examples":["r6y1c8f3n5gw"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Checkout retries context for acme/web#4182"]},"status":{"$ref":"#/components/schemas/Operate.OperateWorkStatus","examples":["finished"]},"archived":{"type":"boolean","examples":[false]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateThreadMessage"},"description":"Conversation text messages in chronological order."}},"description":"An Operate thread with its current status and conversation messages."},"Operate.OperateThreadMessage":{"type":"object","required":["id","role","text","created_at","completed_at"],"properties":{"id":{"type":"string","examples":["msg_01k8abc123"]},"role":{"$ref":"#/components/schemas/Operate.OperateThreadMessageRole","examples":["assistant"]},"text":{"type":"string","examples":["No active checkout incidents, and no deploy freeze until Friday 2:00 PM ET."]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:25.102Z"]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-10-28T15:42:29.418Z"]}},"description":"A text message in an Operate thread conversation. Internal tool calls and reasoning traces are omitted."},"Operate.OperateThreadMessageAccepted":{"type":"object","required":["thread_id","status"],"properties":{"thread_id":{"type":"string","examples":["r6y1c8f3n5gw"]},"status":{"$ref":"#/components/schemas/Operate.OperateWorkStatus","examples":["running"]}}},"Operate.OperateThreadMessageRole":{"type":"string","enum":["user","assistant"]},"Operate.OperateWorkItem":{"type":"object","required":["id","title","status","kind","created_at"],"properties":{"id":{"type":"string","examples":["r6y1c8f3n5gw"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Watch checkout redesign rollout"]},"status":{"$ref":"#/components/schemas/Operate.OperateWorkStatus","examples":["running"]},"kind":{"$ref":"#/components/schemas/Operate.OperateWorkKind","examples":["thread"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]}}},"Operate.OperateWorkKind":{"type":"string","enum":["thread","session"],"description":"`thread` is a private Operate thread of the home session; `session` is a regular Inspect session that Operate started."},"Operate.OperateWorkList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operate.OperateWorkItem"},"description":"The 50 newest open threads and sessions. Empty when the user has no home session."},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Operate.OperateWorkStatus":{"type":"string","enum":["pending","running","finished","failed"]},"Operate.SendOperateMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"What Operate should do and when it should tell you, with links. Operate treats it as a request from another of your agents, not as a message from you.","examples":["Once https://github.com/acme/web/pull/4182 merges, watch the checkout error rate for an hour and tell me if it rises."]},"label":{"type":"string","maxLength":200,"description":"Who is sending, for example `Claude Code in acme/web`. Shown to Operate as self-reported.","examples":["Claude Code in acme/web"]}},"description":"A one-way message for the caller's own Operate."},"Operate.SendOperateThreadMessageRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"Follow-up message for Operate. Operate treats it as a request from another of your agents, not as a message from you.","examples":["Thanks. Can you also watch the deploy after acme/web#4182 merges?"]},"label":{"type":"string","maxLength":200,"description":"Who is sending, for example `Claude Code in acme/web`. Shown to Operate as self-reported.","examples":["Claude Code in acme/web"]}},"description":"Send a follow-up message in an existing Operate thread owned by the caller."},"Operate.StartOperateThreadRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":4000,"pattern":"\\S","description":"Initial message or question for Operate. Operate treats it as a request from another of your agents, not as a message from you, and replies in the thread.","examples":["I am updating checkout retries in acme/web#4182. Are there any open incidents or deploy freezes I should know about?"]},"title":{"type":"string","minLength":1,"maxLength":120,"pattern":"\\S","description":"Optional short title for the Operate thread.","examples":["Checkout retries context for acme/web#4182"]},"label":{"type":"string","maxLength":200,"description":"Who is sending, for example `Claude Code in acme/web`. Shown to Operate as self-reported.","examples":["Claude Code in acme/web"]}},"description":"Start a dedicated Operate thread for a bidirectional conversation with the caller's own Operate."},"OperateMemoryFileNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["file_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"OperateRepositoryScopedApiKeyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"OperateThreadNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["thread_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"OperateUnavailableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["operate_unavailable"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Pagination.PageMeta":{"type":"object","required":["next_cursor","previous_cursor","has_next_page","has_previous_page"],"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the last item in this page. Pass as `after` to fetch the next page. Null when the page is empty.","examples":["eyJ2IjoxLCJzIjoicHVibGlzaGVkX2F0X2Rlc2MiLCJrIjpbZmFsc2UsMTc5MzAyNDQ2NzMzMCwicjVqMWI4dDN5NnFlIl19"]},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the first item in this page. Null when the page is empty.","examples":["eyJ2IjoxLCJzIjoicHVibGlzaGVkX2F0X2Rlc2MiLCJrIjpbZmFsc2UsMTc5MzIwMjEzMTIwNCwieDdrMm05cTRwMXphIl19"]},"has_next_page":{"type":"boolean","description":"Whether more results exist after this page.","examples":[true]},"has_previous_page":{"type":"boolean","description":"Whether results exist before this page.","examples":[false]}}},"PreviewQaSessionNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["preview_qa_session_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Previews.HttpUrl":{"type":"string","format":"uri","maxLength":2048,"description":"An http or https URL."},"Previews.PreviewName":{"type":"string","maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z][a-z0-9]*)*$","description":"Preview name chosen by the caller, e.g. `default` or `storybook`. Lowercase kebab-case where each segment starts with a letter, at most 64 characters. The `default` preview is the session's primary preview.","examples":["default"]},"Previews.PreviewStatus":{"type":"string","enum":["deploying","deployed","failed"]},"Previews.PullRequestNumber":{"type":"integer","format":"int64","exclusiveMinimum":0,"examples":[1234]},"Previews.PullRequestPreview":{"type":"object","required":["name","label","embeddable","status","url","commit_sha","last_succeeded_at","error","occurred_at"],"properties":{"name":{"type":"string","description":"Preview name","examples":["default"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the preview","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. When false, Inspect links to the preview instead.","examples":[false]},"status":{"$ref":"#/components/schemas/Previews.PreviewStatus","description":"Most recently reported status","examples":["deployed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Last successfully deployed URL, kept while a newer deploy is in progress or has failed","examples":["https://web-git-jane-checkout-redesign-acme.vercel.app"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit the `url` was built from","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the preview last deployed successfully","examples":["2026-10-28T15:42:11.204Z"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure details for a failed status","examples":[null]},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the most recently reported status occurred","examples":["2026-10-28T15:42:11.204Z"]}}},"Previews.PullRequestPreviewList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Previews.PullRequestPreview"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Previews.RepositoryName":{"type":"string","examples":["web"]},"Previews.RepositoryOwner":{"type":"string","examples":["acme"]},"Previews.UpsertDeployedPullRequestPreviewRequest":{"type":"object","required":["status","url"],"properties":{"status":{"type":"string","enum":["deployed"]},"url":{"$ref":"#/components/schemas/Previews.HttpUrl","description":"Preview URL (http or https).","examples":["https://web-git-jane-checkout-redesign-acme.vercel.app"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":64,"description":"Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":100,"description":"Display name for the preview. Omit to keep the current label.","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. Set it to `true` only when the preview URL allows Inspect as a frame ancestor and loads without a sign-in page that refuses to be framed. Omit to keep the current value; new previews default to `false`, which shows a link that opens the preview in a new tab.","examples":[false]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Failure details, recorded when `status` is `failed`.","examples":["Build failed: next build exited with code 1"]},"occurred_at":{"type":"string","format":"date-time","description":"When the status change occurred. Defaults to receipt time.","examples":["2026-10-28T15:42:11.204Z"]}},"description":"Unknown properties are rejected.","additionalProperties":false},"Previews.UpsertDeployingPullRequestPreviewRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["deploying"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":64,"description":"Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":100,"description":"Display name for the preview. Omit to keep the current label.","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. Set it to `true` only when the preview URL allows Inspect as a frame ancestor and loads without a sign-in page that refuses to be framed. Omit to keep the current value; new previews default to `false`, which shows a link that opens the preview in a new tab.","examples":[false]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Failure details, recorded when `status` is `failed`.","examples":["Build failed: next build exited with code 1"]},"occurred_at":{"type":"string","format":"date-time","description":"When the status change occurred. Defaults to receipt time.","examples":["2026-10-28T15:42:11.204Z"]}},"description":"Unknown properties are rejected.","additionalProperties":false},"Previews.UpsertFailedPullRequestPreviewRequest":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["failed"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":64,"description":"Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":100,"description":"Display name for the preview. Omit to keep the current label.","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. Set it to `true` only when the preview URL allows Inspect as a frame ancestor and loads without a sign-in page that refuses to be framed. Omit to keep the current value; new previews default to `false`, which shows a link that opens the preview in a new tab.","examples":[false]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Failure details, recorded when `status` is `failed`.","examples":["Build failed: next build exited with code 1"]},"occurred_at":{"type":"string","format":"date-time","description":"When the status change occurred. Defaults to receipt time.","examples":["2026-10-28T15:42:11.204Z"]}},"description":"Unknown properties are rejected.","additionalProperties":false},"Previews.UpsertPullRequestPreviewFields":{"type":"object","properties":{"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":64,"description":"Commit the preview was built from. Recommended: Inspect uses it to mark previews of older commits as outdated.","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":100,"description":"Display name for the preview. Omit to keep the current label.","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. Set it to `true` only when the preview URL allows Inspect as a frame ancestor and loads without a sign-in page that refuses to be framed. Omit to keep the current value; new previews default to `false`, which shows a link that opens the preview in a new tab.","examples":[false]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"maxLength":2000,"description":"Failure details, recorded when `status` is `failed`.","examples":["Build failed: next build exited with code 1"]},"occurred_at":{"type":"string","format":"date-time","description":"When the status change occurred. Defaults to receipt time.","examples":["2026-10-28T15:42:11.204Z"]}}},"Previews.UpsertPullRequestPreviewRequest":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Previews.UpsertDeployingPullRequestPreviewRequest"},{"$ref":"#/components/schemas/Previews.UpsertDeployedPullRequestPreviewRequest"},{"$ref":"#/components/schemas/Previews.UpsertFailedPullRequestPreviewRequest"}],"discriminator":{"propertyName":"status","mapping":{"deploying":"#/components/schemas/Previews.UpsertDeployingPullRequestPreviewRequest","deployed":"#/components/schemas/Previews.UpsertDeployedPullRequestPreviewRequest","failed":"#/components/schemas/Previews.UpsertFailedPullRequestPreviewRequest"}},"description":"A `deployed` status requires `url`."},"Previews.UpsertedPullRequestPreview":{"type":"object","required":["name","label","embeddable","status","url","commit_sha","last_succeeded_at","error","occurred_at","session_ids"],"properties":{"name":{"type":"string","description":"Preview name","examples":["default"]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name for the preview","examples":["Web app"]},"embeddable":{"type":"boolean","description":"Whether the preview can be shown in a frame inside the Inspect UI. When false, Inspect links to the preview instead.","examples":[false]},"status":{"$ref":"#/components/schemas/Previews.PreviewStatus","description":"Most recently reported status","examples":["deployed"]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"Last successfully deployed URL, kept while a newer deploy is in progress or has failed","examples":["https://web-git-jane-checkout-redesign-acme.vercel.app"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit the `url` was built from","examples":["8f3c2a1d9e7b6f5a4c3d2e1f0a9b8c7d6e5f4a3b"]},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the preview last deployed successfully","examples":["2026-10-28T15:42:11.204Z"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure details for a failed status","examples":[null]},"occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the most recently reported status occurred","examples":["2026-10-28T15:42:11.204Z"]},"session_ids":{"type":"array","items":{"type":"string"},"description":"Sessions updated by this request. Empty when no session is linked to the pull request or the update was older than the stored status.","examples":[["n4b8v2c6x9zq"]]}}},"PrivateAgentNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["private_agent_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ProjectArchivedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["project_archived"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ProjectForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ProjectNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["project_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Projects.AddProjectSessionRequest":{"type":"object","required":["session_id"],"properties":{"session_id":{"$ref":"#/components/schemas/Projects.ProjectSessionId","description":"The session to add. Its subagents and other descendant sessions move with it."}}},"Projects.CreateProjectRequest":{"type":"object","required":["name"],"properties":{"name":{"$ref":"#/components/schemas/Projects.ProjectName"},"description":{"$ref":"#/components/schemas/Projects.ProjectDescription","default":""}}},"Projects.Project":{"type":"object","required":["id","name","description","created_by_id","created_at","updated_at","archived_at"],"properties":{"id":{"type":"string","examples":["p4x9k2m7q1zt"]},"name":{"type":"string","examples":["Checkout redesign"]},"description":{"type":"string","examples":["Rebuild the checkout flow across web and API."]},"created_by_id":{"type":"string","description":"User id of the project's creator.","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-29T13:05:47.912Z"]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]}}},"Projects.ProjectDescription":{"type":"string","maxLength":4000,"examples":["Rebuild the checkout flow across web and API."]},"Projects.ProjectDetail":{"type":"object","required":["id","name","description","created_by_id","created_at","updated_at","archived_at","participants","is_participant"],"properties":{"id":{"type":"string","examples":["p4x9k2m7q1zt"]},"name":{"type":"string","examples":["Checkout redesign"]},"description":{"type":"string","examples":["Rebuild the checkout flow across web and API."]},"created_by_id":{"type":"string","description":"User id of the project's creator.","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-29T13:05:47.912Z"]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Projects.ProjectParticipant"}},"is_participant":{"type":"boolean","description":"Whether the API key user participates in the project.","examples":[true]}}},"Projects.ProjectId":{"type":"string","minLength":1,"maxLength":64,"examples":["p4x9k2m7q1zt"]},"Projects.ProjectList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Projects.ProjectListItem"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Projects.ProjectListItem":{"type":"object","required":["id","name","description","created_by_id","created_at","updated_at","archived_at","participant_count","is_participant"],"properties":{"id":{"type":"string","examples":["p4x9k2m7q1zt"]},"name":{"type":"string","examples":["Checkout redesign"]},"description":{"type":"string","examples":["Rebuild the checkout flow across web and API."]},"created_by_id":{"type":"string","description":"User id of the project's creator.","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"created_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-29T13:05:47.912Z"]},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"participant_count":{"type":"integer","format":"int32","examples":[3]},"is_participant":{"type":"boolean","description":"Whether the API key user participates in the project.","examples":[true]}}},"Projects.ProjectMembership":{"type":"object","required":["project_id","is_participant"],"properties":{"project_id":{"type":"string","examples":["p4x9k2m7q1zt"]},"is_participant":{"type":"boolean","description":"Whether the API key user participates in the project after the request.","examples":[true]}}},"Projects.ProjectName":{"type":"string","minLength":1,"maxLength":120,"examples":["Checkout redesign"]},"Projects.ProjectPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Projects.ProjectParticipant":{"type":"object","required":["id","name","email","joined_at","coordinator_session_id"],"properties":{"id":{"type":"string","description":"User id.","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"name":{"type":"string","examples":["Ada Lovelace"]},"email":{"type":"string","examples":["ada@example.com"]},"joined_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The participant's live coordinator session in the project, if any.","examples":["c7n2w5r8t1yb"]}}},"Projects.ProjectSessionId":{"type":"string","minLength":1,"maxLength":64,"examples":["k3v8n1q6w2tb"]},"Projects.ProjectSessionMove":{"type":"object","required":["session_id","project_id","previous_project_id","moved_descendant_count"],"properties":{"session_id":{"type":"string","examples":["k3v8n1q6w2tb"]},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session's project after the change, or null when it was removed.","examples":["p4x9k2m7q1zt"]},"previous_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The session's project before the change.","examples":[null]},"moved_descendant_count":{"type":"integer","format":"int32","description":"Descendant sessions that moved with the session.","examples":[2]}}},"Projects.UpdateProjectRequest":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/Projects.ProjectName"},"description":{"$ref":"#/components/schemas/Projects.ProjectDescription"}}},"PromptRequiredError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["prompt_required"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"PullRequestBranchMismatchError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["pull_request_branch_mismatch"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"PullRequestNotAdoptableError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["pull_request_not_adoptable"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"PullRequestNotOpenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["pull_request_not_open"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ReadOnlyApiKeyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["read_only_api_key"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Repositories.CreateRepositoryRequest":{"type":"object","required":["url"],"properties":{"url":{"$ref":"#/components/schemas/Repositories.RepositoryUrl","description":"GitHub repository URL, for example `https://github.com/acme/widgets`. The Inspect GitHub App must have access to the repository.","examples":["https://github.com/acme/web"]}}},"Repositories.Repository":{"type":"object","required":["id","name","description","organization","remote","github_host","base_branch","auto_match_enabled","ci_auto_fix_ignored_checks","merge_queue","automatic_reviews"],"properties":{"id":{"type":"string","description":"Repository identifier","examples":["web"]},"name":{"type":"string","description":"Repository name","examples":["web"]},"description":{"type":"string","description":"Repository description","examples":["Acme customer dashboard and marketing site"]},"organization":{"type":"string","description":"GitHub organization or owner for this repository.","examples":["acme"]},"remote":{"$ref":"#/components/schemas/Repositories.RepositoryRemote","examples":["github"]},"github_host":{"type":"string","enum":["github"],"description":"Compatibility host key for this GitHub.com repository."},"base_branch":{"type":"string","description":"Default branch for the repository","examples":["main"]},"auto_match_enabled":{"type":"boolean","description":"Whether repository inference may select this repository without an explicit directive or URL","examples":[true]},"ci_auto_fix_ignored_checks":{"type":"array","items":{"type":"string"},"description":"Check names that never trigger CI autofix.","examples":[["codecov/patch"]]},"merge_queue":{"anyOf":[{"$ref":"#/components/schemas/Repositories.RepositoryMergeQueue"},{"type":"null"}],"description":"Merge queue override. Null means the GitHub merge queue."},"automatic_reviews":{"$ref":"#/components/schemas/Repositories.RepositoryAutomaticReviews","description":"Repository-wide automatic reviews: `on` for every pull request, `inspect` for pull requests linked to an Inspect session, and `off` to turn off repository-wide reviews. Personal preferences can still turn on reviews for an author's pull requests.","examples":["on"]}},"description":"A repository configured in Inspect."},"Repositories.RepositoryAutomaticReviews":{"type":"string","enum":["on","inspect","off"]},"Repositories.RepositoryCheckName":{"type":"string","minLength":1,"maxLength":200},"Repositories.RepositoryId":{"type":"string","examples":["web"]},"Repositories.RepositoryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Repositories.Repository"}},"meta":{"$ref":"#/components/schemas/Repositories.RepositoryListMeta"}}},"Repositories.RepositoryListMeta":{"type":"object","required":["next_cursor","previous_cursor","has_next_page","has_previous_page","suggested"],"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the last item in this page. Pass as `after` to fetch the next page. Null when the page is empty.","examples":["eyJ2IjoxLCJzIjoicHVibGlzaGVkX2F0X2Rlc2MiLCJrIjpbZmFsc2UsMTc5MzAyNDQ2NzMzMCwicjVqMWI4dDN5NnFlIl19"]},"previous_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor of the first item in this page. Null when the page is empty.","examples":["eyJ2IjoxLCJzIjoicHVibGlzaGVkX2F0X2Rlc2MiLCJrIjpbZmFsc2UsMTc5MzIwMjEzMTIwNCwieDdrMm05cTRwMXphIl19"]},"has_next_page":{"type":"boolean","description":"Whether more results exist after this page.","examples":[true]},"has_previous_page":{"type":"boolean","description":"Whether results exist before this page.","examples":[false]},"suggested":{"type":"array","items":{"type":"string"},"description":"IDs of the repositories the user has used most, most used first. Up to five; always empty for system API keys.","examples":[["web","api"]]}}},"Repositories.RepositoryMergeQueue":{"type":"object","required":["provider"],"properties":{"provider":{"$ref":"#/components/schemas/Repositories.RepositoryMergeQueueProvider","examples":["github"]}}},"Repositories.RepositoryMergeQueueProvider":{"type":"string","enum":["github","trunk"],"description":"Merge queue provider"},"Repositories.RepositoryRemote":{"type":"string","enum":["github","codestorage"],"description":"Backing remote type for the repository"},"Repositories.RepositoryUrl":{"type":"string","format":"uri","minLength":1,"description":"An http or https GitHub repository URL."},"Repositories.UpdateRepositoryRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Display name. Must not be empty.","examples":["web"]},"description":{"type":"string","maxLength":2000,"examples":["Acme customer dashboard and marketing site"]},"base_branch":{"type":"string","maxLength":200,"description":"Default branch. Must not be empty.","examples":["main"]},"ci_auto_fix_ignored_checks":{"type":"array","items":{"$ref":"#/components/schemas/Repositories.RepositoryCheckName"},"maxItems":100,"examples":[["codecov/patch"]]},"merge_queue":{"$ref":"#/components/schemas/Repositories.RepositoryMergeQueue","description":"Merge queue override. Returns 400 when the provider is not available."},"automatic_reviews":{"$ref":"#/components/schemas/Repositories.RepositoryAutomaticReviews","examples":["on"]}},"description":"Omitted fields are unchanged."},"RepositoryAccessDeniedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryAlreadyExistsError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_already_exists"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryManagementForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryNotInSessionError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_not_in_session"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"RepositoryRequiredError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["repository_required"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ScopeIdNotSupportedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["scope_id_not_supported"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionChangedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["session_changed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionCostLimitReachedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["session_cost_limit_reached"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["session_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionNotInProjectError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["session_not_in_project"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SessionProjectChangeNotAllowedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["session_project_change_not_allowed"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Sessions.ApiCallbackDataSchema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]}},"unevaluatedProperties":{}},"Sessions.ApprovalProviderStatus":{"type":"string","enum":["not_started","pending","success","ineligible","unavailable","failed","stale"]},"Sessions.ApprovalPublication":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch"],"properties":{"source_sequence":{"type":"integer","minimum":0,"examples":[7]},"generation":{"type":"integer","minimum":0,"examples":[2]},"publication_sequence":{"type":"integer","minimum":0,"examples":[3]},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["main"]}}},"Sessions.ApprovalRationale":{"type":"object","required":["version","sections"],"properties":{"version":{"type":"number","enum":[1],"examples":[1]},"sections":{"type":"array","items":{"type":"object","properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["Checks"]},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","examples":["CI"]},"status":{"type":"string","enum":["passed","failed","pending","not_completed","neutral"],"examples":["passed"]},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["All required checks passed on the latest commit."]},"session_ids":{"type":"array","items":{"type":"string"},"examples":[["d4f7j2l9s6ub"]]},"details":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","examples":["Required checks"]},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"values":{"type":"array","items":{"type":"string"},"examples":[["build","test","lint"]]}},"required":["label","text","values"]}}},"required":["title","status","summary","session_ids","details"]}}},"required":["title","items"]}}}},"Sessions.ApprovalStatus":{"type":"object","required":["stamp_buddy","smart_reviewer"],"properties":{"stamp_buddy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.StampBuddyApprovalStatus"},{"type":"null"}]},"smart_reviewer":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SmartReviewerApprovalStatus"},{"type":"null"}]}}},"Sessions.AssistantMessage":{"type":"object","required":["role","id","created_at","completed_at","model_id","parts"],"properties":{"role":{"type":"string","enum":["assistant"]},"id":{"type":"string","description":"Unique message identifier","examples":["msg_laminar_h2k9x4m7q1pd_msg_laminar_user_41"]},"created_at":{"type":"string","format":"date-time","description":"When the agent started the message","examples":["2026-10-28T15:42:14.870Z"]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the agent finished the message. Null for the latest message while the session is still running.","examples":["2026-10-28T16:07:45.918Z"]},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Model that produced the message, or null when unknown","examples":["claude-opus-5-5"]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.MessagePart"},"description":"Content parts that make up the message, in the order the agent produced them"}},"description":"The agent's response to a user turn."},"Sessions.AutoApprovalStatus":{"type":"string","enum":["pending","available","approved","human_approved","ineligible","review_agent_blocked","shadow","inactive","unavailable","stale"]},"Sessions.ContextualActionKey":{"type":"string","enum":["send_prompt","request_review","merge_when_ready","archive_session"]},"Sessions.CreateSessionMultipartRequest":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Sessions.CreateSessionRequest"}],"description":"JSON-encoded create session request."},"attachments":{"type":"array","items":{},"description":"Optional file attachments."}},"required":["data"]},"Sessions.CreateSessionRequest":{"type":"object","required":["repository"],"properties":{"review_buddy_reviewers":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.ReviewBuddyReviewer"},"description":"Optional Review agent reviewers. Each model must be available to the caller and support the requested reasoning effort."},"repository":{"type":"string","minLength":1,"description":"The repository to create the session for. Use \"auto\" to infer the best repository from the prompt.","examples":["web"]},"prompt":{"type":"string","description":"The initial prompt for the session. At least one of prompt, attachments, or agent_context is required.","examples":["Verified users who haven't joined a workspace get redirected back to /signup in a loop. Find the cause and fix it."]},"title":{"type":"string","description":"Optional title for the session. When omitted, Inspect generates one from the creation request.","examples":["Fix signup redirect loop"]},"no_reply":{"type":"boolean","description":"If true, stores the prompt and dispatches the runner silently without posting an assistant reply back into the session timeline.","examples":[false],"default":false},"model":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"$ref":"#/components/schemas/Models.ModelAlias"},{"type":"string"}],"description":"Optional model ID or shorthand alias. An explicit model takes precedence over custom-agent and saved-default models; leave unspecified to use the normal default selection. Use GET /api/v2/models for model IDs and aliases.","examples":["claude-opus-5-5"]},"variant":{"$ref":"#/components/schemas/Models.ModelVariant","description":"Optional model variant. Supported values depend on the model; see `supported_variants` in GET /api/v2/models. When omitted, public API automation sessions default gpt-6-luna and gpt-5.6-luna to medium and otherwise use the model's default variant.","examples":["high"]},"service_tier":{"$ref":"#/components/schemas/Sessions.ModelServiceTier","description":"Optional model service tier. Supported values depend on the selected model; unsupported combinations return 400.","examples":["default"]},"enabled_skill_ids":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SkillId"},"description":"Optional list of skill IDs to enable for this session in addition to those configured on the caller's user settings, custom agent, or referenced via slash commands in the prompt. Unknown skill IDs are ignored.","examples":[["release-notes"]]},"base_branch":{"type":"string","description":"Optional base branch, defaults to the repository's default branch. If provided, Inspect normalizes common Git prefixes and verifies the branch exists on GitHub before creating the session.","examples":["main"]},"base_commit":{"type":"string","description":"Benchmark mode only (SWE-bench agent). Pins the session to a per-session Code Storage fork of the repository at this commit SHA: full real history up to the commit, no forward history, and no GitHub remote. Required (non-blank) for the SWE-bench agent; ignored for other agents.","examples":["3e7b2a9c4d1f6e8b0a5c7d9e2f4b6a8c1d3e5f70"]},"branch":{"type":"string","description":"Optional branch name for the session, only pass this if trying to work on an existing branch","examples":["jane/inspect-fix-signup-redirect-3f9a"]},"pull_request_number":{"type":"number","description":"Optional existing pull request number to associate with this session","examples":[1842]},"attach_pull_request":{"type":"boolean","description":"Whether Inspect may automatically associate this session with an existing pull request that matches pull_request_number or branch. Set to false to check out branch without attaching its existing pull request. Pull requests created by this session are still attached. Defaults to true.","examples":[true],"default":true},"agent_context":{"type":"string","description":"Optional additional context for the agent that will not appear in user messages. Useful for providing detailed system context or metadata that should inform the agent but not clutter the visible conversation.","examples":["Reported in #web-oncall. Repro: accept an invite link, verify your email, then open /dashboard."]},"agent_id":{"type":"string","description":"Optional ID of an agent to use for this session. When provided, the session will be configured with the agent's system prompt, model, capability settings, and any repository restrictions. If the agent is limited to a set of repositories, the chosen repository must be within that set. Private agents cannot be started from the public API. Use GET /api/v2/agents to list available agents and their IDs.","examples":["a6g3k8e1v9ym"]},"project_id":{"$ref":"#/components/schemas/Projects.ProjectId","description":"Optional ID of a project to start the session in. The session owner (the API key user, or the `on_behalf_of` user) must participate in the project, and the API key needs the `projects:write` scope. Use GET /api/v2/projects to find project IDs."},"read_only":{"type":"boolean","description":"Deprecated. Read-only sessions are not fully supported: this flag blocks only some Inspect tools and does not restrict other tools, including connector tools. Do not rely on it to prevent changes.","deprecated":true,"examples":[false],"default":false},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Controls whether the session appears in discoverable listings and analytics exports. Private sessions remain accessible by direct URL/session ID, but are excluded from list endpoints, public tables, leaderboards, and exports.","examples":["public"]},"settings":{"$ref":"#/components/schemas/Sessions.CreateSessionSettings","description":"Optional session settings"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.NonEmptyString"},"description":"Optional list of collaborator email addresses to add to the session. Users matching these emails will be added as session participants.","examples":[["sam@acme.com"]]},"pull_request_footer":{"type":"string","description":"Optional custom footer text to append to PR descriptions. This will appear between the agent-generated description and the standard Inspect footer.","examples":["Requested by the growth team in #web-oncall."]},"commit_prefix":{"type":"string","description":"Optional prefix to prepend to commit messages and PR titles. Useful for linking sessions to external systems like incident trackers or issue management tools.","examples":["[WEB-4821]"]},"pull_request_labels":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.TrimmedNonEmptyString"},"description":"Optional list of GitHub labels to apply to any PR created or adopted by this session. Child sessions inherit these labels automatically.","examples":[["bug","inspect"]]},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionTag"},"maxItems":50,"description":"Optional list of tags for grouping and filtering sessions (for example, run IDs, workflow names, or tenant keys).","examples":[["signup","web-oncall"]]},"callback_url":{"type":"string","format":"uri","description":"Optional HTTPS webhook URL that the session can call back to via the api_callback tool. The hostname must be allowed by Inspect. When provided, the agent inside the session can send structured events to this URL, proxied through the Inspect API.","examples":["https://hooks.acme.com/inspect/callbacks"]},"api_callback_data_schema":{"$ref":"#/components/schemas/Sessions.ApiCallbackDataSchema","description":"Optional JSON Schema describing the expected shape of the `data` argument of the `api_callback` tool. Must be an object whose `type`, when present, is `object`. The schema is injected verbatim into the api_callback tool's description so the model knows what payload to send back.","examples":[{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"]}]},"api_callback_event_types":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.TrimmedNonEmptyString"},"minItems":1,"description":"Optional non-empty list of allowed event_type values for the api_callback tool. When provided, Inspect exposes those values as the tool schema enum and rejects callbacks whose event_type is not in the list.","examples":[["fix_ready","needs_input"]],"uniqueItems":true},"on_behalf_of":{"type":"string","format":"email","description":"Optional email address of an existing Inspect user to create the session on behalf of. When provided, the session will be owned by and attributed to this user (including git commits and PR authorship) instead of the API key owner. The user must have logged into Inspect at least once.","examples":["jane@acme.com"]},"attribution_source":{"$ref":"#/components/schemas/Sessions.SessionAttributionSource","description":"Optional internal workflow that started the session, for usage attribution. Fixed at creation.","examples":["approval_agent"]},"attributed_session_id":{"$ref":"#/components/schemas/Sessions.SessionId","description":"Optional ID of an existing session in your organization that this session's usage rolls up to, including its session tree and automation. Ignored when no such session exists. Fixed at creation."}}},"Sessions.CreateSessionSettings":{"type":"object","properties":{"ci_failures_enabled":{"type":"boolean","description":"Whether to automatically respond to CI failures for this session. Defaults to user settings or true.","examples":[true]},"auto_address_pull_request_reviews_policy":{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicyInput","description":"Optional per-session automatic PR review addressing policy. When provided, it overrides the session owner's saved policy for reviews associated with this session."}}},"Sessions.DeployStatus":{"type":"string","enum":["succeeded","failed"]},"Sessions.DiffSource":{"type":"string","enum":["local","github"]},"Sessions.Message":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Sessions.UserMessage"},{"$ref":"#/components/schemas/Sessions.AssistantMessage"}],"discriminator":{"propertyName":"role","mapping":{"user":"#/components/schemas/Sessions.UserMessage","assistant":"#/components/schemas/Sessions.AssistantMessage"}},"description":"A message in the session conversation, discriminated by `role`."},"Sessions.MessageList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.Message"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.MessagePart":{"type":"object","oneOf":[{"$ref":"#/components/schemas/Sessions.MessageTextPart"},{"$ref":"#/components/schemas/Sessions.MessageReasoningPart"},{"$ref":"#/components/schemas/Sessions.MessageToolCallPart"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/Sessions.MessageTextPart","reasoning":"#/components/schemas/Sessions.MessageReasoningPart","tool_call":"#/components/schemas/Sessions.MessageToolCallPart"}},"description":"A content part of a message, discriminated by `type`."},"Sessions.MessageReasoningPart":{"type":"object","required":["type","id","text"],"properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string","description":"Unique part identifier","examples":["prt_laminar_seq_42"]},"text":{"type":"string","examples":["The middleware only checks `emailVerified`, so I should look at where it sends users without a workspace."]}},"description":"Model reasoning emitted before or between other parts of an assistant message."},"Sessions.MessageSource":{"type":"string","enum":["web","chrome_extension","slack","slack_reaction","github","linear","microsoft_teams","zoom","email","review_chat","automation","background_task","agent","unknown"],"description":"How a user turn was submitted."},"Sessions.MessageTextPart":{"type":"object","required":["type","id","text"],"properties":{"type":{"type":"string","enum":["text"]},"id":{"type":"string","description":"Unique part identifier","examples":["prt_laminar_seq_44"]},"text":{"type":"string","examples":["The redirect loop came from `requireOnboarding` treating verified users without a workspace as new signups. I added a workspace check and opened acme/web#1842."]}},"description":"Text written by the user or the agent."},"Sessions.MessageToolCallPart":{"type":"object","required":["type","id","call_id","name","status","input","output","error","started_at","completed_at","subagent"],"properties":{"type":{"type":"string","enum":["tool_call"]},"id":{"type":"string","description":"Unique part identifier","examples":["prt_laminar_seq_43"]},"call_id":{"type":"string","description":"ID the model assigned to the tool call.","examples":["toolu_01A9xK3mPq7RtV2wYz8bN4cD"]},"name":{"type":"string","description":"Tool name","examples":["Bash"]},"status":{"type":"string","enum":["running","completed","error"],"description":"`running` until the tool returns, then `completed` or `error`.","examples":["completed"]},"input":{"type":"object","unevaluatedProperties":{},"description":"Tool input arguments. The shape depends on the tool.","examples":[{"command":"rg -n \"redirect\" apps/web/src/auth"}]},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tool output when `status` is `completed`, otherwise null.","examples":["apps/web/src/auth/requireOnboarding.ts:18:    return redirect('/signup')"]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Error message when `status` is `error`, otherwise null.","examples":[null]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the tool call started, or null when it has not started.","examples":["2026-10-28T15:43:02.118Z"]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the tool returned when `status` is `completed` or `error`, otherwise null.","examples":["2026-10-28T15:43:02.596Z"]},"subagent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.MessageToolCallSubagent"},{"type":"null"}],"description":"The subagent this tool call started, or null for tool calls that do not run a subagent."}},"description":"A tool call made by the agent, with its input and result."},"Sessions.MessageToolCallSubagent":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Subagent ID. Use it with the subagent messages and cost endpoints of the session.","examples":["01M61KAC2XM9S346Q3D25VT4F5"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name of the agent that ran the subagent, or null when unknown.","examples":["Verification agent"]}},"description":"The subagent a tool call started."},"Sessions.ModelServiceTier":{"type":"string","enum":["default","auto","flex","priority"]},"Sessions.NonEmptyString":{"type":"string","minLength":1},"Sessions.PromptDelivery":{"type":"string","enum":["immediate","queued"]},"Sessions.PullRequestStatus":{"type":"string","enum":["draft","awaiting_review","approved","queued","closed","merged"]},"Sessions.QueuedPrompt":{"type":"object","required":["id","created_at"],"properties":{"id":{"type":"string","description":"Durable queued prompt acceptance handle. There is no per-prompt public lifecycle endpoint yet.","examples":["01M61K9QWB7Z3N8R5T2V4X6Y8A"]},"created_at":{"type":"string","format":"date-time","description":"Timestamp from the persisted Hosted Agent prompt row.","examples":["2026-10-28T15:58:22.610Z"]}}},"Sessions.ReviewBuddyReviewer":{"type":"object","required":["model","reasoning_effort"],"properties":{"model":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"type":"string"}],"description":"Model ID from GET /api/v2/models, including models served only by this cell's Ramp Router.","examples":["gpt-6.1-sol"]},"reasoning_effort":{"$ref":"#/components/schemas/Models.ModelVariant","examples":["high"]}}},"Sessions.SendPromptMultipartRequest":{"type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/Sessions.SendPromptRequest"}],"description":"JSON-encoded prompt request."},"attachments":{"type":"array","items":{},"description":"Optional file attachments."}},"required":["data"]},"Sessions.SendPromptRequest":{"type":"object","properties":{"review_buddy_reviewers":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.ReviewBuddyReviewer"},"description":"Optional Review agent reviewers merged into the session's reviewers. Each model must be available to the caller and support the requested reasoning effort."},"prompt":{"type":"string","description":"The follow-up prompt to accept. At least one of prompt, attachments, or agent_context is required.","examples":["Also handle invite links that expire while the user is verifying their email."]},"no_reply":{"type":"boolean","description":"If true, stores the prompt and dispatches the runner silently without posting an assistant reply back into the session timeline.","examples":[false],"default":false},"model":{"anyOf":[{"$ref":"#/components/schemas/Models.ModelId"},{"$ref":"#/components/schemas/Models.ModelAlias"},{"type":"string"}],"description":"Optional model ID or shorthand alias to switch to for this prompt. When omitted, the session keeps its current model. Use GET /api/v2/models for model IDs and aliases.","examples":["claude-opus-5-5"]},"variant":{"$ref":"#/components/schemas/Models.ModelVariant","description":"Optional model variant. Supported values depend on the model; see `supported_variants` in GET /api/v2/models. Defaults to the session's current variant.","examples":["high"]},"agent_context":{"type":"string","description":"Optional additional context for the agent that will not appear in user messages.","examples":["Invite links expire after 72 hours."]},"commit_prefix":{"type":"string","description":"Optional prefix to prepend to commit messages and PR titles.","examples":["[WEB-4821]"]},"delivery":{"$ref":"#/components/schemas/Sessions.PromptDelivery","description":"`immediate` (default) dispatches the prompt right away. `queued` stores the prompt behind active or outstanding work and returns `queued_prompt` metadata. If an existing session has no outstanding prompts, a queued request is promoted to immediate delivery, `queued_prompt` is omitted, and a dormant sandbox is restarted.","examples":["immediate"],"default":"immediate"}}},"Sessions.SendPromptResult":{"type":"object","required":["data","queued_prompt"],"properties":{"data":{"$ref":"#/components/schemas/Sessions.Session"},"queued_prompt":{"anyOf":[{"$ref":"#/components/schemas/Sessions.QueuedPrompt"},{"type":"null"}],"description":"The queued prompt when the prompt remained queued, otherwise null."}}},"Sessions.Session":{"type":"object","required":["id","title","description","status","retryable","visibility","model","user","opening_pull_request","pushing","working_phase","deploy","vnc_url","vnc_expires_at","ota_install_url","ota_qr_code_url","ota_expires_at","has_changes","created_at","finished_at","last_read_at","deleted_at","pull_requests","repositories","branch","base_branch","stack_base_branch","helpfulness","helpfulness_reason","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","last_user_message_at","parent_session_id","project_id","child_sessions","tags","automation","automation_trigger_source","contextual_actions","settings","viewer_is_owner","read_only","participants","agent","workspace"],"properties":{"id":{"type":"string","description":"Unique identifier for the session","examples":["h2k9x4m7q1pd"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated title for the session","examples":["Fix signup redirect loop"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated description for the session","examples":["Stops the signup flow from redirecting verified users back to /signup and handles expired invite links."]},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the session","examples":["finished"]},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the failed operation is expected to succeed if retried. Null unless status is failed; false for archived sessions and failures known to be permanent, otherwise true. Retry mechanics and limits are defined by the calling workflow.","examples":[null]},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Whether this session is discoverable in listings and exports, or only accessible by direct link/session ID.","examples":["public"]},"model":{"$ref":"#/components/schemas/Sessions.SessionModel"},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"},"opening_pull_request":{"type":"boolean","description":"Whether a PR is currently being opened","examples":[false]},"pushing":{"type":"boolean","description":"Whether changes are currently being pushed","examples":[false]},"working_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current working phase of the agent","examples":[null]},"deploy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionDeploy"},{"type":"null"}]},"vnc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"vnc_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"ota_install_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"ota_qr_code_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"ota_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"has_changes":{"type":"boolean","description":"Whether the session has uncommitted changes","examples":[true]},"created_at":{"type":"string","format":"date-time","description":"When the session was created","examples":["2026-10-28T15:42:11.204Z"]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session finished","examples":["2026-10-28T16:07:45.918Z"]},"last_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the API key user last read this session","examples":["2026-10-28T16:12:03.441Z"]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session was archived","examples":[null]},"pull_requests":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionPullRequest"},"description":"All current pull requests for the session across its repositories."},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionRepository"},"description":"Per-repository source-control state. The first repository is the launch and deploy anchor."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Git branch name for the session","examples":["jane/inspect-fix-signup-redirect-3f9a"]},"base_branch":{"type":"string","description":"Base branch for the session","examples":["main"]},"stack_base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch this session was explicitly stacked on. Preserved when GitHub retargets the pull request after an upstream merge.","examples":[null]},"helpfulness":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"User rating of helpfulness (-1 = not helpful, 0 = neutral, 1 = helpful)","examples":[1]},"helpfulness_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided reason for the helpfulness rating","examples":["Found the root cause on the first pass."]},"total_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1284530]},"total_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[38214]},"total_reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[12907]},"total_cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1102345]},"total_cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[96410]},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1322744]},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latest persisted total session cost in USD. Null when no usage has been recorded.","examples":[4.82]},"last_user_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last user message was sent","examples":["2026-10-28T15:58:22.610Z"]},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session if this is a child session","examples":[null]},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Project this session belongs to","examples":[null]},"child_sessions":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionChild"},"description":"Direct child sessions spawned from this session. Always empty in list responses."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the session as added by the session owner, or by the `tagged_by` user when that list-endpoint parameter is provided. Tags are per-user; other users' tags are not included.","examples":[["signup","web-oncall"]]},"automation":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAutomation"},{"type":"null"}],"description":"Automation that created this session, if any. Null for sessions created manually or via the API."},"automation_trigger_source":{"anyOf":[{"type":"string","enum":["scheduled","manual","service_trigger","internal"]},{"type":"null"}],"description":"How the automation run that created this session was triggered. Always null in list responses.","examples":[null]},"contextual_actions":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionContextualActions"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/Sessions.SessionSettings","description":"Session settings controlling behavior like notifications"},"viewer_is_owner":{"type":"boolean","description":"Whether the current user owns this session","examples":[true]},"read_only":{"type":"boolean","description":"Whether this is a read-only session where the agent cannot create PRs, push code, or make persistent changes","examples":[false]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionParticipant"},"description":"Users who have participated in this session"},"agent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAgent"},{"type":"null"}],"description":"Custom agent the session runs with. Always null in list responses."},"workspace":{"$ref":"#/components/schemas/Sessions.SessionWorkspace"}}},"Sessions.SessionAgent":{"type":"object","required":["id","name","model","avatar_url"],"properties":{"id":{"type":"string","examples":["a6g3k8e1v9ym"]},"name":{"type":"string","examples":["Frontend fixer"]},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["claude-opus-5-5"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]}}},"Sessions.SessionAttributionSource":{"type":"string","enum":["approval_agent"]},"Sessions.SessionAutomation":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Unique automation identifier","examples":["u9e2r5t8y3wq"]},"name":{"type":"string","description":"Human-readable automation name","examples":["Nightly dependency upgrades"]}}},"Sessions.SessionChild":{"type":"object","required":["id","title","name","status","created_at"],"properties":{"id":{"type":"string","description":"Child session identifier","examples":["c8w3n6y1t5rb"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Child session title","examples":["Audit invite link expiry handling"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Child session name, or null when the child session has no name","examples":["invite-expiry-audit"]},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the child session","examples":["finished"]},"created_at":{"type":"string","format":"date-time","description":"When the child session was created","examples":["2026-10-28T15:47:29.552Z"]}}},"Sessions.SessionContextualActions":{"type":"object","required":["source_assistant_message_id","suggestions"],"properties":{"source_assistant_message_id":{"type":"string","examples":["msg_laminar_h2k9x4m7q1pd_msg_laminar_user_41"]},"suggestions":{"type":"array","items":{"type":"object","properties":{"action_key":{"$ref":"#/components/schemas/Sessions.ContextualActionKey"},"label":{"type":"string"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}]},"repository":{"anyOf":[{"type":"string"},{"type":"null"}]},"pull_request_number":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["action_key","label","prompt","repository","pull_request_number"]},"examples":[[{"action_key":"request_review","label":"Request review","prompt":null,"repository":"web","pull_request_number":1842}]]}}},"Sessions.SessionCost":{"type":"object","required":["session_id","message_count","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","updated_at"],"properties":{"session_id":{"type":"string","description":"Unique identifier for the session","examples":["h2k9x4m7q1pd"]},"message_count":{"type":"integer","description":"Always 0. Retained for response compatibility.","examples":[0]},"total_input_tokens":{"type":"integer","description":"Input tokens, including cache read and cache write tokens","examples":[1284530]},"total_output_tokens":{"type":"integer","description":"Output tokens, including reasoning tokens","examples":[38214]},"total_reasoning_tokens":{"type":"integer","description":"Reasoning output tokens","examples":[12907]},"total_cache_read_tokens":{"type":"integer","description":"Cache read input tokens","examples":[1102345]},"total_cache_write_tokens":{"type":"integer","description":"Cache write input tokens","examples":[96410]},"total_tokens":{"type":"integer","description":"Total tokens included in the refreshed cost rollup","examples":[1322744]},"total_cost":{"type":"number","format":"double","description":"Total session cost in USD","examples":[4.82]},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the cost rollup was last refreshed. Null when no usage has been recorded.","examples":["2026-10-28T16:07:46.302Z"]}}},"Sessions.SessionDeploy":{"type":"object","required":["active","url","commit_sha","latest_commit_sha","last_succeeded_at","last_attempt_status","last_attempt_commit_sha","last_attempt_started_at","timed_out","outdated"],"properties":{"active":{"type":"boolean","description":"Whether a deploy has been attempted","examples":[true]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL of the deployed preview","examples":["https://web-git-jane-inspect-fix-signup-redirect-3f9a-acme.vercel.app"]},"commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit SHA of the last successful deploy","examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"latest_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latest commit SHA pushed to the branch","examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last successful deploy occurred","examples":["2026-10-28T16:05:37.000Z"]},"last_attempt_status":{"anyOf":[{"$ref":"#/components/schemas/Sessions.DeployStatus"},{"type":"null"}],"description":"Status of the latest completed deploy attempt","examples":["succeeded"]},"last_attempt_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Commit SHA of the latest completed deploy attempt","examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"last_attempt_started_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Unix timestamp in milliseconds when the latest deploy attempt started","examples":[1793203351000]},"timed_out":{"type":"boolean","description":"Whether the latest preview deploy did not report completion in time","examples":[false]},"outdated":{"type":"boolean","description":"Whether the preview is outdated (deployed commit differs from latest pushed commit)","examples":[false]}},"description":"Deploy preview state"},"Sessions.SessionDetail":{"type":"object","required":["id","title","description","status","retryable","visibility","model","user","opening_pull_request","pushing","working_phase","deploy","vnc_url","vnc_expires_at","ota_install_url","ota_qr_code_url","ota_expires_at","has_changes","created_at","finished_at","last_read_at","deleted_at","pull_requests","repositories","branch","base_branch","stack_base_branch","helpfulness","helpfulness_reason","total_input_tokens","total_output_tokens","total_reasoning_tokens","total_cache_read_tokens","total_cache_write_tokens","total_tokens","total_cost","last_user_message_at","parent_session_id","project_id","child_sessions","tags","automation","automation_trigger_source","contextual_actions","settings","viewer_is_owner","read_only","participants","agent","workspace","slack_thread_permalink"],"properties":{"id":{"type":"string","description":"Unique identifier for the session","examples":["h2k9x4m7q1pd"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated title for the session","examples":["Fix signup redirect loop"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Auto-generated description for the session","examples":["Stops the signup flow from redirecting verified users back to /signup and handles expired invite links."]},"status":{"$ref":"#/components/schemas/Sessions.SessionStatus","description":"Current status of the session","examples":["finished"]},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether the failed operation is expected to succeed if retried. Null unless status is failed; false for archived sessions and failures known to be permanent, otherwise true. Retry mechanics and limits are defined by the calling workflow.","examples":[null]},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"Whether this session is discoverable in listings and exports, or only accessible by direct link/session ID.","examples":["public"]},"model":{"$ref":"#/components/schemas/Sessions.SessionModel"},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"},"opening_pull_request":{"type":"boolean","description":"Whether a PR is currently being opened","examples":[false]},"pushing":{"type":"boolean","description":"Whether changes are currently being pushed","examples":[false]},"working_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current working phase of the agent","examples":[null]},"deploy":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionDeploy"},{"type":"null"}]},"vnc_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"vnc_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"ota_install_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"ota_qr_code_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"ota_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":[null]},"has_changes":{"type":"boolean","description":"Whether the session has uncommitted changes","examples":[true]},"created_at":{"type":"string","format":"date-time","description":"When the session was created","examples":["2026-10-28T15:42:11.204Z"]},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session finished","examples":["2026-10-28T16:07:45.918Z"]},"last_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the API key user last read this session","examples":["2026-10-28T16:12:03.441Z"]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the session was archived","examples":[null]},"pull_requests":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionPullRequest"},"description":"All current pull requests for the session across its repositories."},"repositories":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionRepository"},"description":"Per-repository source-control state. The first repository is the launch and deploy anchor."},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Git branch name for the session","examples":["jane/inspect-fix-signup-redirect-3f9a"]},"base_branch":{"type":"string","description":"Base branch for the session","examples":["main"]},"stack_base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Branch this session was explicitly stacked on. Preserved when GitHub retargets the pull request after an upstream merge.","examples":[null]},"helpfulness":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"User rating of helpfulness (-1 = not helpful, 0 = neutral, 1 = helpful)","examples":[1]},"helpfulness_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"User-provided reason for the helpfulness rating","examples":["Found the root cause on the first pass."]},"total_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1284530]},"total_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[38214]},"total_reasoning_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[12907]},"total_cache_read_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1102345]},"total_cache_write_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[96410]},"total_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"examples":[1322744]},"total_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Latest persisted total session cost in USD. Null when no usage has been recorded.","examples":[4.82]},"last_user_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last user message was sent","examples":["2026-10-28T15:58:22.610Z"]},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session if this is a child session","examples":[null]},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Project this session belongs to","examples":[null]},"child_sessions":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionChild"},"description":"Direct child sessions spawned from this session. Always empty in list responses."},"tags":{"type":"array","items":{"type":"string"},"description":"Tags on the session as added by the session owner, or by the `tagged_by` user when that list-endpoint parameter is provided. Tags are per-user; other users' tags are not included.","examples":[["signup","web-oncall"]]},"automation":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAutomation"},{"type":"null"}],"description":"Automation that created this session, if any. Null for sessions created manually or via the API."},"automation_trigger_source":{"anyOf":[{"type":"string","enum":["scheduled","manual","service_trigger","internal"]},{"type":"null"}],"description":"How the automation run that created this session was triggered. Always null in list responses.","examples":[null]},"contextual_actions":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionContextualActions"},{"type":"null"}]},"settings":{"$ref":"#/components/schemas/Sessions.SessionSettings","description":"Session settings controlling behavior like notifications"},"viewer_is_owner":{"type":"boolean","description":"Whether the current user owns this session","examples":[true]},"read_only":{"type":"boolean","description":"Whether this is a read-only session where the agent cannot create PRs, push code, or make persistent changes","examples":[false]},"participants":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionParticipant"},"description":"Users who have participated in this session"},"agent":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionAgent"},{"type":"null"}],"description":"Custom agent the session runs with. Always null in list responses."},"workspace":{"$ref":"#/components/schemas/Sessions.SessionWorkspace"},"slack_thread_permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Permalink to the Slack thread linked to the session, if any.","examples":["https://acme.slack.com/archives/C04N8KQ2V7X/p1793200931204519"]}}},"Sessions.SessionId":{"type":"string","examples":["h2k9x4m7q1pd"]},"Sessions.SessionList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.Session"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.SessionModel":{"type":"object","required":["id","name","provider","variant","service_tier"],"properties":{"id":{"type":"string","description":"Model identifier","examples":["claude-opus-5-5"]},"name":{"type":"string","description":"Human-readable model name","examples":["Claude Opus 5.5"]},"provider":{"type":"string","description":"Model provider (e.g., anthropic, openai)","examples":["anthropic"]},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active model variant, or null when not applicable.","examples":["high"]},"service_tier":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ModelServiceTier"},{"type":"null"}],"description":"Service tier the session runs on, or null when none was selected.","examples":[null]}}},"Sessions.SessionPageSize":{"type":"integer","format":"int32","minimum":1,"maximum":100},"Sessions.SessionParticipant":{"type":"object","required":["id","session_id","user_id","joined_at","last_active_at","left_at","user"],"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Participant identifier, or null for the session owner when they have not joined the session explicitly","examples":[null]},"session_id":{"type":"string","examples":["h2k9x4m7q1pd"]},"user_id":{"type":"string","examples":["Kq8vN3xR7mT2pL5wB9cY4dF6gH1jZ0aE"]},"joined_at":{"type":"string","format":"date-time","examples":["2026-10-28T15:42:11.204Z"]},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"examples":["2026-10-28T16:12:03.441Z"]},"left_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the participant left the session, or null.","examples":[null]},"user":{"$ref":"#/components/schemas/Sessions.SessionUser"}}},"Sessions.SessionPullRequest":{"type":"object","required":["repository","github_repository","url","pull_request_number","adopted_at","status_updated_at","title","review_session_id","approval_status","status","merged_at","author"],"properties":{"repository":{"type":"string","description":"Repository ID that owns the pull request","examples":["web"]},"github_repository":{"type":"string","description":"Canonical GitHub repository name, which may differ from the Inspect repository ID.","examples":["web"]},"url":{"type":"string","format":"uri","description":"GitHub pull request URL","examples":["https://github.com/acme/web/pull/1842"]},"pull_request_number":{"type":"integer","description":"Pull request number","examples":[1842]},"adopted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request was adopted into the session","examples":["2026-10-28T15:56:40.117Z"]},"status_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request last changed workflow status","examples":["2026-10-28T16:10:04.871Z"]},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pull request title","examples":["Fix signup redirect loop for verified users"]},"review_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["d4f7j2l9s6ub"]},"approval_status":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ApprovalStatus"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/Sessions.PullRequestStatus","description":"Workflow status of the pull request","examples":["awaiting_review"]},"merged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the pull request was merged, or null if it has not been merged","examples":[null]},"author":{"anyOf":[{"$ref":"#/components/schemas/Sessions.SessionPullRequestAuthor"},{"type":"null"}],"description":"GitHub user who opened the pull request, or null when unknown"}}},"Sessions.SessionPullRequestAuthor":{"type":"object","required":["login","display_name","avatar_url","profile_url"],"properties":{"login":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub login","examples":["jane-acme"]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub display name","examples":["Jane Doe"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub avatar URL","examples":["https://avatars.githubusercontent.com/u/48151623?v=4"]},"profile_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"GitHub profile URL","examples":["https://github.com/jane-acme"]}}},"Sessions.SessionRepository":{"type":"object","required":["id","state_updated_at","branch","base_branch","latest_commit_sha","diff"],"properties":{"id":{"type":"string","description":"Repository ID","examples":["web"]},"state_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When this repository state was last updated","examples":["2026-10-28T16:05:12.330Z"]},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Current branch for this repository","examples":["jane/inspect-fix-signup-redirect-3f9a"]},"base_branch":{"type":"string","description":"Base branch for this repository","examples":["main"]},"latest_commit_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Latest commit SHA pushed for this repository","examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"diff":{"$ref":"#/components/schemas/Sessions.SessionRepositoryDiff"}}},"Sessions.SessionRepositoryDiff":{"type":"object","required":["file_id","local_file_id","source","additions","deletions"],"properties":{"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Authoritative diff file ID","examples":["session-h2k9x4m7q1pd-w8r3n5t1y6ka.diff"]},"local_file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Local working-tree diff file ID","examples":["session-h2k9x4m7q1pd-q3v8m1k6z2ta.diff"]},"source":{"anyOf":[{"$ref":"#/components/schemas/Sessions.DiffSource"},{"type":"null"}],"description":"Source of the authoritative diff","examples":["github"]},"additions":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of lines added","examples":[48]},"deletions":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Number of lines deleted","examples":[11]}}},"Sessions.SessionSettings":{"type":"object","required":["ci_failures_enabled","auto_address_pull_request_reviews_policy"],"properties":{"ci_failures_enabled":{"type":"boolean","description":"Whether to automatically respond to CI failures","examples":[true]},"auto_address_pull_request_reviews_policy":{"anyOf":[{"$ref":"#/components/schemas/Automations.AutoAddressPrReviewsPolicy"},{"type":"null"}],"description":"Per-session automatic PR review addressing policy, or null when the session owner's saved policy applies."}}},"Sessions.SessionSortOrder":{"type":"string","enum":["created_at_desc","created_at_asc"]},"Sessions.SessionStatus":{"type":"string","enum":["pending","running","finished","failed"]},"Sessions.SessionSubagent":{"type":"object","required":["id","kind","name","status","created_at"],"properties":{"id":{"type":"string","description":"Unique identifier for the subagent. Use it with the subagent messages and cost endpoints of its parent session.","examples":["01M61KAC2XM9S346Q3D25VT4F5"]},"kind":{"$ref":"#/components/schemas/Sessions.SessionSubagentKind","description":"`verifier` for Verification agent runs Inspect started for the session; `subagent` for other subagents.","examples":["verifier"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Display name of the subagent, if known.","examples":["Verification agent"]},"status":{"$ref":"#/components/schemas/Sessions.SessionSubagentStatus","description":"Current status of the subagent.","examples":["completed"]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the subagent was created, if known.","examples":["2026-10-28T15:51:03.517Z"]}}},"Sessions.SessionSubagentId":{"type":"string","examples":["01M61KAC2XM9S346Q3D25VT4F5"]},"Sessions.SessionSubagentKind":{"type":"string","enum":["verifier","subagent"]},"Sessions.SessionSubagentList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionSubagent"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Sessions.SessionSubagentStatus":{"type":"string","enum":["running","completed","error","abandoned"]},"Sessions.SessionTag":{"type":"string","minLength":1,"maxLength":100},"Sessions.SessionTags":{"type":"object","required":["tags"],"properties":{"tags":{"type":"array","items":{"type":"string"},"description":"The caller's tags on the session after replacement.","examples":[["signup","web-oncall"]]}}},"Sessions.SessionUser":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string","description":"User identifier","examples":["Kq8vN3xR7mT2pL5wB9cY4dF6gH1jZ0aE"]},"name":{"type":"string","description":"User display name","examples":["Jane Doe"]},"email":{"type":"string","description":"User email address","examples":["jane@acme.com"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"URL to user profile image","examples":["https://lh3.googleusercontent.com/a/ACg8ocJ4kP9xQ2mV7nR3tW8yB5cL1dF6hG0sZeA=s96-c"]}}},"Sessions.SessionVerificationStarted":{"type":"object","required":["status","repository","pull_request_number"],"properties":{"status":{"type":"string","enum":["started","already_running"],"description":"`started` when a new Verification agent run started, superseding any older run for the pull request; `already_running` when a run for the current head was already in progress.","examples":["started"]},"repository":{"type":"string","description":"Repository of the verified pull request.","examples":["web"]},"pull_request_number":{"type":"integer","description":"Number of the verified pull request.","examples":[1842]}}},"Sessions.SessionVisibility":{"type":"string","enum":["public","private"]},"Sessions.SessionWorkspace":{"type":"object","required":["id","name","description","organization","remote","github_host","base_branch"],"properties":{"id":{"type":"string","examples":["web"]},"name":{"type":"string","examples":["web"]},"description":{"type":"string","examples":["Acme customer dashboard and marketing site"]},"organization":{"type":"string","examples":["acme"]},"remote":{"type":"string","enum":["github","codestorage"],"examples":["github"]},"github_host":{"type":"string","enum":["github"],"examples":["github"]},"base_branch":{"type":"string","examples":["main"]}},"description":"The workspace a session is attached to."},"Sessions.SkillId":{"type":"string","minLength":1},"Sessions.SmartReviewerApprovalStatus":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch","status","current","reason","recommendation","request_review_binding","updated_at"],"properties":{"source_sequence":{"type":"integer","minimum":0,"examples":[7]},"generation":{"type":"integer","minimum":0,"examples":[2]},"publication_sequence":{"type":"integer","minimum":0,"examples":[3]},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["main"]},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus","examples":["success"]},"current":{"type":"boolean","examples":[true]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"recommendation":{"anyOf":[{"type":"object","properties":{"login":{"type":"string"},"status":{"type":"string","enum":["available","requested","received","draft"]},"reasoning":{"type":"string"},"selection_reason":{"type":"string"}},"required":["login","status","reasoning","selection_reason"]},{"type":"null"}],"examples":[{"login":"mchen","status":"requested","reasoning":"Owns the signup and invite flows and reviewed the last three changes to apps/web/src/auth.","selection_reason":"Most recent reviewer of the changed files"}]},"request_review_binding":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":4096,"examples":[null]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-28T16:10:04.871Z"]}}},"Sessions.StampBuddyApprovalStatus":{"type":"object","required":["source_sequence","generation","publication_sequence","head_sha","base_branch","view_status","status","current","reason","rationale","risk_tier","auto_approval","history","grant_approval_binding","updated_at"],"properties":{"source_sequence":{"type":"integer","minimum":0,"examples":[7]},"generation":{"type":"integer","minimum":0,"examples":[2]},"publication_sequence":{"type":"integer","minimum":0,"examples":[3]},"head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"base_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["main"]},"view_status":{"type":"string","enum":["ready","not_started","not_enrolled","unavailable"],"examples":["ready"]},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus","examples":["success"]},"current":{"type":"boolean","examples":[true]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":[null]},"rationale":{"anyOf":[{"$ref":"#/components/schemas/Sessions.ApprovalRationale"},{"type":"null"}]},"risk_tier":{"anyOf":[{"type":"string","enum":["no_risk","low","medium","major"]},{"type":"null"}],"examples":["low"]},"auto_approval":{"$ref":"#/components/schemas/Sessions.AutoApprovalStatus","examples":["approved"]},"history":{"type":"array","items":{"type":"object","properties":{"head_sha":{"type":"string","minLength":1,"examples":["9c4e1b7a2f6d8e3c5b0a9f1e7d2c4b6a8e0f3d5c"]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"examples":["d4f7j2l9s6ub"]},"status":{"$ref":"#/components/schemas/Sessions.ApprovalProviderStatus","examples":["success"]},"auto_approval":{"$ref":"#/components/schemas/Sessions.AutoApprovalStatus","examples":["approved"]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-28T16:09:58.204Z"]}},"required":["head_sha","session_id","status","auto_approval","updated_at"]},"maxItems":20},"grant_approval_binding":{"anyOf":[{"type":"string"},{"type":"null"}],"minLength":1,"maxLength":4096,"examples":[null]},"updated_at":{"type":"string","format":"date-time","examples":["2026-10-28T16:09:58.204Z"]}}},"Sessions.StartSessionVerificationRequest":{"type":"object","properties":{"repository":{"type":"string","minLength":1,"description":"Repository of the pull request to verify. Required only when the session has pull requests in multiple repositories.","examples":["web"]}}},"Sessions.TrimmedNonEmptyString":{"type":"string","minLength":1},"Sessions.UpdateBaseBranchRequest":{"type":"object","required":["new_base_branch"],"properties":{"new_base_branch":{"type":"string","minLength":1,"description":"The new base branch. GitHub URL and ref prefixes such as refs/heads/ and origin/ are normalized.","examples":["release/2026-11"]}}},"Sessions.UpdateBaseBranchSuccess":{"type":"object","required":["previous_base_branch","new_base_branch","pull_request_updated","repository","pull_request_number","needs_rebase"],"properties":{"previous_base_branch":{"type":"string","examples":["main"]},"new_base_branch":{"type":"string","examples":["release/2026-11"]},"pull_request_updated":{"type":"boolean","description":"Whether an existing pull request was updated on GitHub.","examples":[true]},"repository":{"type":"string","description":"Repository whose base branch changed.","examples":["web"]},"pull_request_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The existing pull request number, if the session has one.","examples":[1842]},"needs_rebase":{"type":"boolean","description":"Whether the session has a feature branch or pull request whose commits may need to be replayed onto the new base.","examples":[true]}}},"Sessions.UpdateSessionRequest":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"New session title.","examples":["Fix signup redirect loop"]},"visibility":{"$ref":"#/components/schemas/Sessions.SessionVisibility","description":"New visibility. Private sessions cannot be made public.","examples":["private"]},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.NonEmptyString"},"description":"Collaborator emails to add as session participants.","examples":[["sam@acme.com"]]}}},"Sessions.UpdateSessionTagsRequest":{"type":"object","required":["tags"],"properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.SessionTag"},"maxItems":50,"description":"The complete set of tags the API key's user applies to the session. Pass an empty array to remove all of the caller's tags.","examples":[["signup","web-oncall"]]}}},"Sessions.UserMessage":{"type":"object","required":["role","id","created_at","source","parent_session_id","synthetic","parts"],"properties":{"role":{"type":"string","enum":["user"]},"id":{"type":"string","description":"Unique message identifier","examples":["msg_laminar_user_41"]},"created_at":{"type":"string","format":"date-time","description":"When the message was sent","examples":["2026-10-28T15:42:11.204Z"]},"source":{"anyOf":[{"$ref":"#/components/schemas/Sessions.MessageSource"},{"type":"null"}],"description":"Origin of the turn. Human-authored sources include `web`, `chrome_extension`, `slack`, `github`, `linear`, `email` and `review_chat` (the latter arrive via an integration but are written by a person). `automation` and `background_task` are injected programmatically and are not human-authored; `agent` turns are sent by another agent, Inspect session, or the agent runtime, such as parent or child session messages; `slack_reaction` and `unknown` are unclassified. Platform-generated turns, such as goal continuations and scheduled wake-ups, also set `synthetic: true`. Every prompt submitted through the public API is stamped `automation`. Null on older messages.","examples":["automation"]},"parent_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ID of the parent session when the turn was sent within a child session, otherwise null.","examples":[null]},"synthetic":{"type":"boolean","description":"True on platform-generated turns, such as scheduled wake-ups.","examples":[false]},"parts":{"type":"array","items":{"$ref":"#/components/schemas/Sessions.MessagePart"},"description":"Content parts that make up the message"}},"description":"A turn submitted to the session by a user, an integration, or another agent."},"SkillConflictError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["skill_conflict"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SkillForbiddenError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["forbidden"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SkillNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["skill_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SkillRequestTooLargeError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["payload_too_large"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"Skills.CollaboratorId":{"type":"string","minLength":1},"Skills.CreateSkillRequest":{"type":"object","required":["id"],"properties":{"id":{"$ref":"#/components/schemas/Skills.SkillId","description":"Unique kebab-case skill ID","examples":["release-notes"]},"description":{"type":"string","maxLength":1024,"description":"At most 1024 characters, per the Agent Skills spec","examples":["Draft release notes for acme/web from pull requests merged since the last tag."],"default":""},"content":{"type":"string","description":"`SKILL.md` body. Mutually exclusive with `files`.","examples":["---\nname: release-notes\ndescription: Draft release notes for acme/web from pull requests merged since the last tag.\n---\n\n# Release notes\n\n1. Find the latest release tag.\n2. List pull requests merged since that tag.\n3. Group changes into Features, Fixes, and Internal.\n"]},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFileInput"},"maxItems":20,"description":"Complete file set including `SKILL.md`. Mutually exclusive with `content`. At most 20 files and 20 MB in total."},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Skills.CollaboratorId"},"description":"Inspect user IDs who can also edit the skill","examples":[["Bm7tR2vXq9Kc4NwL8pZf3HyD6sGa1JeU"]],"default":[]}},"description":"Provide either `content` or `files`, not both.","not":{"required":["content","files"]},"additionalProperties":false},"Skills.Skill":{"type":"object","required":["id","url","description","files","builtin","owner","collaborators","viewer_can_edit","created_at","updated_at"],"properties":{"id":{"type":"string","description":"Kebab-case skill ID","examples":["release-notes"]},"url":{"type":"string","format":"uri","description":"Skill page in Inspect","examples":["https://app.inspect.com/customize/skills/release-notes"]},"description":{"type":"string","examples":["Draft release notes for acme/web from pull requests merged since the last tag."]},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFile"}},"builtin":{"type":"boolean","description":"Built-in skills are read-only","examples":[false]},"owner":{"anyOf":[{"$ref":"#/components/schemas/Skills.SkillPerson"},{"type":"null"}],"description":"Skill owner; null for built-in skills"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillPerson"}},"viewer_can_edit":{"type":"boolean","description":"Whether the API key user can update or archive this skill","examples":[true]},"created_at":{"type":"string","format":"date-time","description":"Creation time; the Unix epoch for built-in skills","examples":["2026-10-28T15:42:11.204Z"]},"updated_at":{"type":"string","format":"date-time","description":"Last update time; the Unix epoch for built-in skills","examples":["2026-10-29T09:17:36.512Z"]}}},"Skills.SkillFile":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string","description":"Safe relative file path, for example `SKILL.md` or `scripts/run.sh`","examples":["SKILL.md"]},"content":{"type":"string","description":"File contents","examples":["---\nname: release-notes\ndescription: Draft release notes for acme/web from pull requests merged since the last tag.\n---\n\n# Release notes\n\n1. Find the latest release tag.\n2. List pull requests merged since that tag.\n3. Group changes into Features, Fixes, and Internal.\n"]}}},"Skills.SkillFileInput":{"type":"object","required":["name","content"],"properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Safe relative file path, for example `SKILL.md` or `scripts/run.sh`. Backslashes, control characters, and empty, `.` or `..` segments are rejected.","examples":["SKILL.md"]},"content":{"type":"string","description":"File contents","examples":["---\nname: release-notes\ndescription: Draft release notes for acme/web from pull requests merged since the last tag.\n---\n\n# Release notes\n\n1. Find the latest release tag.\n2. List pull requests merged since that tag.\n3. Group changes into Features, Fixes, and Internal.\n"]}}},"Skills.SkillId":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9-]+$","description":"Kebab-case skill ID"},"Skills.SkillPathId":{"type":"string","examples":["release-notes"]},"Skills.SkillPerson":{"type":"object","required":["id","name","email","avatar_url"],"properties":{"id":{"type":"string","examples":["Xk3pQ9mZr7Lw2NbT5vYc8HdJ4sFa6GeR"]},"name":{"type":"string","examples":["Jane Doe"]},"email":{"type":"string","examples":["jane@acme.com"]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"examples":["https://lh3.googleusercontent.com/a/ACg8ocJ4kZ2mXw9LrT4nB7cYd1eFgH5sZ0aUiO3pE6tWjN=s96-c"]}}},"Skills.SkillSummary":{"type":"object","required":["id","url","description"],"properties":{"id":{"type":"string","description":"Kebab-case skill ID","examples":["release-notes"]},"url":{"type":"string","format":"uri","description":"Skill page in Inspect","examples":["https://app.inspect.com/customize/skills/release-notes"]},"description":{"type":"string","examples":["Draft release notes for acme/web from pull requests merged since the last tag."]}}},"Skills.SkillSummaryList":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillSummary"}},"meta":{"$ref":"#/components/schemas/Pagination.PageMeta"}}},"Skills.UpdateSkillRequest":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Skills.SkillId","description":"New skill ID, to rename the skill","examples":["release-notes"]},"description":{"type":"string","maxLength":1024,"description":"At most 1024 characters, per the Agent Skills spec","examples":["Draft release notes for acme/web from pull requests merged since the last tag."]},"content":{"type":"string","description":"Replacement `SKILL.md` body. Mutually exclusive with `files`.","examples":["---\nname: release-notes\ndescription: Draft release notes for acme/web from pull requests merged since the last tag.\n---\n\n# Release notes\n\n1. Find the latest release tag.\n2. List pull requests merged since that tag.\n3. Group changes into Features, Fixes, and Internal.\n"]},"files":{"type":"array","items":{"$ref":"#/components/schemas/Skills.SkillFileInput"},"maxItems":20,"description":"Replacement for the complete file set, including `SKILL.md`. Mutually exclusive with `content`. At most 20 files and 20 MB in total."},"collaborator_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/Skills.CollaboratorId"},"description":"Replacement collaborator list","examples":[["Bm7tR2vXq9Kc4NwL8pZf3HyD6sGa1JeU"]]}},"description":"At least one field must be provided. Provide either `content` or `files`, not both.","not":{"required":["content","files"]},"additionalProperties":false,"minProperties":1},"SourceAutomationNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["source_automation_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"SubagentNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["subagent_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"UnauthenticatedError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["unauthenticated"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"UnknownRepositoryError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["unknown_repository"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"UnsupportedReviewerError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["unsupported_reviewer"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"UpstreamError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["upstream_error"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"UpstreamTimeoutError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["upstream_timeout"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"User.UserPreferences":{"type":"object","required":["default_model","default_model_variant"],"properties":{"default_model":{"type":"string","description":"The model ID the user has configured as their default for new sessions. Falls back to the platform default model when unset or no longer available as a default.","examples":["claude-opus-5-5"]},"default_model_variant":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The model variant the user has configured for their default model. Null means use the default variant for that model.","examples":["high"]}}},"UserNotFoundError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["user_not_found"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"ValidationError":{"type":"object","required":["data","error","success"],"properties":{"data":{"description":"The validated input as received.","examples":[{"title":""}]},"error":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"},"description":"Validation issues."},"success":{"type":"boolean","enum":[false]}},"description":"Request validation failure returned by route validators."},"ValidationIssue":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string","description":"Issue code, such as `invalid_type` or `too_small`.","examples":["too_small"]},"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer","format":"int32"}]},"description":"Location of the invalid value within the validated input.","examples":[["title"]]},"message":{"type":"string","description":"Human-readable description of the issue.","examples":["Too small: expected string to have >=1 characters"]}},"description":"A request validation issue reported by the validator."},"VerificationNoPullRequestError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["verification_no_pull_request"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"VerificationNoRuntimeError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["verification_no_runtime"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"VerificationNotConfiguredError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["verification_not_configured"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"VerificationReadonlyError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["verification_readonly"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."},"VerificationSessionPredatesVerifierError":{"type":"object","required":["message","code"],"properties":{"message":{"type":"string","description":"Error message","examples":["Session not found"]},"code":{"type":"string","enum":["verification_session_predates_verifier"],"description":"Machine-readable error code."}},"description":"Error with a machine-readable code from the operation's declared codes."}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication. Use your API key as the bearer token."}}},"servers":[{"url":"{origin}","variables":{"origin":{"default":"https://app.inspect.com","description":"Your Inspect origin"}}}]}